Commit 1a8c9776 by BellCodeEditor

save project

parent 5ec53ebb
Showing with 10324 additions and 0 deletions
with open(r'C:\Users\林\Documents\lesson13-1\sales_list.txt',"r",encoding="utf-8")as a:
g=[]
b=a.readlines()
for c in b:
e=c.split()
d=0
for c in e[1:]:
d=d+int(c)
bbb=e[0]+str(d)+'\n'
g.append(bbb)
with open(r'C:\Users\林\Desktop\新建文本文档.txt',"w",encoding="utf-8")as f:
f.writelines(g)
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