python爬虫之路——基本文件操作

介绍python如何打开文件和读取数据

新建TXT文档,为追加模式;

f=open('c;/wendang/demo.txt','a+') 

content="abcdefg123456789"

f.write(content)

f.close()

原文地址:https://www.cnblogs.com/lanbofei/p/8669841.html