Commit 6f5b5723 by BellCodeEditor

save project

parent 0021f282
Showing with 5 additions and 3 deletions
...@@ -3,7 +3,8 @@ with open(r'c:\Users\Administrator\Desktop\sales_list.txt','r',encoding='utf-8') ...@@ -3,7 +3,8 @@ with open(r'c:\Users\Administrator\Desktop\sales_list.txt','r',encoding='utf-8')
print(a) print(a)
for i in a: for i in a:
b=i.split() b=i.split()
c=b[1:] suum=0
d=b[0] for sals in b[1:]:
print(d) sum+=int(sales)
c=b[0]+str(sum)
print(c) print(c)
\ 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