Commit dcec64f1 by BellCodeEditor

auto save

parent 87cebf45
Showing with 9 additions and 2 deletions
with open('sales_list.txt','r',encoding='utf-8') as f: with open('sales_list.txt','r',encoding='utf-8') as f:
k=f.readlines() k=f.readlines()
for i in k: for i in k:
print(i) t=i.strip().split()
\ No newline at end of file sum=0
for a in t[1:]:
sum+=int(a)
result=t[0]+str(sum)
print(result)
\ 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