用python实现文件读取和内容替换
摘要:
infile = open("D:/test.txt", "r") #打开文件outfile = open("D:/pp2.txt", "w") # 内容输出for line in infile: #按行读文件,可避免文件过大,内存消耗 outfile.write(li... 阅读全文
posted @ 2015-06-10 11:21 矮油~ 阅读(4310) 评论(0) 推荐(0)
posted @ 2015-06-10 11:21 矮油~ 阅读(4310) 评论(0) 推荐(0)