Commit d205fe30 by BellCodeEditor

auto save

parent 7ca141ba
Showing with 5 additions and 2 deletions
with open("c:\\Users\\栩栩\\Documents\\lesson13-1\\sales_list.txt","r",encoding="utf-8")as zhu: with open("c:\\Users\\栩栩\\Documents\\lesson13-1\\sales_list.txt","r",encoding="utf-8")as zhu:
a=zhu.readlines() a=zhu.readlines()
for i in a: for i in a:
shu=0
data=i.split() data=i.split()
print( data[0] ) for s in data[1:]:
print( data[1:]) d=int(s)
shu=shu+d
print(data[0]+str(shu))
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