Commit 5f8b8879 by BellCodeEditor

auto save

parent 38db8b42
Showing with 0 additions and 10 deletions
with open(r"c:\Users\admin\Documents\lesson13-1\sales_list.txt","r",encoding="UTF-8") as a:
a = a.readlines()
for i in a:
i= i.split()
s = 0
for j in i[1:]:
j = int(j)
s += j
print(i[0],s)
\ 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