Commit 150cf1e4 by BellCodeEditor

save project

parent ea824d38
Showing with 4 additions and 3 deletions
......@@ -2,9 +2,10 @@ with open (r'c:\Users\艾特机器人1号\Documents\lesson13-1\sales_list.txt','
a=file.readlines()
f=[]
for i in a:
data=i.split()
data=i.split()
s=0
for x in data[1:]:
s+=int(x)
result=data[0]+str(s).+'\n'
f.append()
result=data[0]+str(s)+'\n'
f.append(result)
print(
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