python文件操作之f.write()

<code># 寫文件 方法一
f = open("20200316.txt",'w')
f.write("hello world!")
f.close()/<code>

<code># 方法二
with open("20200316_1.txt",'w') as f:
f.write("你好!")/<code>


python文件操作之f.write()


分享到:


相關文章: