Commit 45f66d55 by BellCodeEditor

save project

parent c5a6bfc6
Showing with 6 additions and 1 deletions
...@@ -3,4 +3,9 @@ with open(r"c:\Users\Lenovo\Documents\lesson13-3\sales_list.txt","r",encoding="u ...@@ -3,4 +3,9 @@ with open(r"c:\Users\Lenovo\Documents\lesson13-3\sales_list.txt","r",encoding="u
#print(a) #print(a)
for i in a: for i in a:
data=i.split() data=i.split()
print(data[1:]) sum=0
for b in data[1:]:
sum=sum+int(b)
g=data[0]+str(sum)
print(g)
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