python3
#=============
word_list = ["物流","送货"]
file_name = "xxx.txt" #要处理的txt文件名
s = 0
line_list = []
with open(file_name,'r') as tp:
for line in tp:
for word in word_list:
if word in line:
line_list.append(line)
s += int(line[0])
break
print(s)
for line in line_list:
print(line.strip())
input()
#=============
没有错误处理