摘要:
为了熟悉python的文件读写,写了一个小程序#coding=utf-8import osimport sysimport ref1 = open('xxx.log','r')f2 = open('temp.txt','w')lines = f1.readlines()num = 0for line in lines: if line[0]=='2' and line[1]=='0' and line[2]=='1' and line[4]=='-': f2.writ 阅读全文