Commit 6aa31768 by BellCodeEditor

auto save

parent 5ec53ebb
Showing with 14 additions and 0 deletions
with open(r"D:\sales_list.txt",'r',encoding='utf-8') as file:
k=file.readlines()
finally_list=[]
for i in k:
key=i.split()
sum=0
for j in key[1:]:
sum=sum+int(j)
result=key[0] + str(sum) +'\n'
finally_list.append(result)
#print(result)
with open(r"D:\最终义卖款.txt",'a',encoding='utf-8') as file1:
file1.writelines(finally_list)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment