python 文件操作
摘要:
写操作,w清空原内容再写入,a追加写入 f = open('test.txt', 'a', encoding='utf-8') f.write('hello\n') f.write('你好\n') f.close() 读取操作 f = open('test.txt', 'r', encoding=' 阅读全文
posted @ 2019-12-18 18:21 71218813 阅读(154) 评论(0) 推荐(0)
posted @ 2019-12-18 18:21 71218813 阅读(154) 评论(0) 推荐(0)
posted @ 2019-12-18 15:15 71218813 阅读(248) 评论(0) 推荐(0)