摘要:
在文本每行末尾加; 更好的写法 f = open(r'D:\test1\1.txt','rb') w = open(r'D:\test1\2.txt','wb') import os with f as lines: with w as outfile: for line in lines: lin 阅读全文
摘要:
1 import re 2 p = re.compile('AAAAAAAA',re.S) 3 f = open(r"D:\test\oldfile.txt","r").read() 4 paralist = p.split(f) 5 total_num = len(paralist) 6 for paraindex in range(total_num): 7 filewrit... 阅读全文