Commit 3111ca13 by BellCodeEditor

auto save

parent c369b454
Showing with 5 additions and 1 deletions
...@@ -2,4 +2,8 @@ with open(r"c:\Users\lenovo\Documents\lesson13_2\sales_list.txt","r",encoding="u ...@@ -2,4 +2,8 @@ with open(r"c:\Users\lenovo\Documents\lesson13_2\sales_list.txt","r",encoding="u
a = q.readlines() a = q.readlines()
for i in a: for i in a:
data = i.split() data = i.split()
print(data[1:]) sum = 0
for s in data[1:]:
sum += int(s)
b = data[0] + str(sum)
print(b)
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