aa = "12345678"
with open("数字.txt","w",encoding='utf-8')as f:
f.write(aa)
#这样文件写入后不需要写aa.close()
python 文件写入自动关闭方法
最新推荐文章于 2024-04-17 09:33:24 发布
aa = "12345678"
with open("数字.txt","w",encoding='utf-8')as f:
f.write(aa)
#这样文件写入后不需要写aa.close()