Commit d933950a by BellCodeEditor

save project

parent 54aa9877
Showing with 5 additions and 3 deletions
...@@ -5,5 +5,7 @@ with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',enco ...@@ -5,5 +5,7 @@ with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',enco
for i in a: for i in a:
data=i.split() data=i.split()
sum=0 sum=0
for s in data: for s in data[1:]:
sum=sum+int(s[1:]) sum=sum+int(s)
\ No newline at end of file sb=data[0]+str(sum)
print(sb)
\ 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