result=[]
with open(“AhCustomSCDResult.txt”,encoding=‘utf-8’) as f:
for line in f:
templine=line.split(‘|’)
result.append(templine[2:])
python 分行读取txt文件
于 2022-03-19 15:57:42 首次发布
result=[]
with open(“AhCustomSCDResult.txt”,encoding=‘utf-8’) as f:
for line in f:
templine=line.split(‘|’)
result.append(templine[2:])