摘要: 文件处理 读写模式 ‘r+’ 可读; 文件不存在就报错 覆盖(从光标处向后覆盖,传多少内容就覆盖多少,并不是全部擦除) with open(r'1.txt',mode='r+',encoding='utf-8') as f: print(f.readable()) print(f.writable( 阅读全文
posted @ 2019-07-08 20:39 不在一城 阅读(161) 评论(0) 推荐(0) 编辑