摘要: 1、文本文件写入dataf = open('name.txt',mode='w') #打开文件,若文件不存在系统自动创建。 #参数name 文件名,mode 模式。 f.write('hello word 你好 \n') # write 写入 f.writelines(['hello\n','wor 阅读全文
posted @ 2021-05-06 10:56 月光之下 阅读(1047) 评论(0) 推荐(0) 编辑