python如何操做txt文件

讀取文件內容 with open("data/file1.txt","r", encoding='utf8') as f: lines = f.readlines() for line in lines: print(line) 保存內容至txt # result爲你要寫入的數字或者其餘 with open("data/file11.txt", "w", encod
相關文章
相關標籤/搜索