#文件对象,核心类型,使用open函数创建该对象,使用'w'选项写文件
f = open('./test.dat','w')
f.writelines('haha')
f.close()

of = open('./test.dat')
lines = of.readlines()
for l in lines:
    print(l)
#print(of.read())
of.close()
#import os
#print(os.getcwd())
d3b9ad75a9ce4d3b6297756187879383539846b9
<mask token>

<mask token>
f.writelines('haha')
f.close()
<mask token>
for l in lines:
    print(l)
of.close()

f = open('./test.dat', 'w')
f.writelines('haha')
f.close()
of = open('./test.dat')
lines = of.readlines()
for l in lines:
    print(l)
of.close()

#文件对象,核心类型,使用open函数创建该对象,使用'w'选项写文件
f = open('./test.dat','w')
f.writelines('haha')
f.close()

of = open('./test.dat')
lines = of.readlines()
for l in lines:
    print(l)
#print(of.read())
of.close()
#import os
#print(os.getcwd())