Python处理日志文件过程中报”IndexError: list index out of range”错
某次在处理日志文件(共有150 603行),采用以下程序运行报错。 import codecs path=r"D:\tmps\日志文件-B题2019.log" f= open(path,'r',encoding='ISO-8859-1') s=f.read() rows=s.split("\n") u=[] target=dict() for i in rows: r=i.split("\t") …