写入文件
res=‘hello world‘
f=open(‘123.txt‘,‘w‘,encording=‘utf-8‘)
f.write(f)
f.close
读文件
f=open(‘123‘,‘r‘,encording=‘utf-8‘)
f.read
文件的内容读写
原文:https://www.cnblogs.com/pangniu1234/p/10700906.html