Commit dbe7ea48 by BellCodeEditor

save project

parent 56be2e07
Showing with 4 additions and 3 deletions
...@@ -4,6 +4,7 @@ with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',enco ...@@ -4,6 +4,7 @@ with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',enco
aaa=i.split() aaa=i.split()
sum=0 sum=0
for sales in aaa[1:]: for sales in aaa[1:]:
sum=sum+int(sales)
rl=aaa[0]+str(sum) sum=sum+int(sales)
print(rl) rl=aaa[0]+str(sum)
print(rl)
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