介绍python如何打开文件和读取数据
新建TXT文档,为追加模式;
f=open('c;/wendang/demo.txt','a+') content="abcdefg123456789" f.write(content) f.close()
f=open('c;/wendang/demo.txt','a+')
content="abcdefg123456789"
f.write(content)
f.close()