摘要: 一、打开文件的几种模式 1.使用open()函数打开文件,创建一个file对象,例如:f = open(r'D:\haha.txt','a+',encoding='utf-8') 或 with open(r'D:\haha.txt','a+',encoding='utf-8') as f --该种写 阅读全文