Commit 04e09b3c by BellCodeEditor

auto save

parent 8f3d8548
Showing with 3 additions and 9 deletions
with open(r'c:\Users\84249\Documents\lesson13_2\sales_list.txt','r',encoding='utf-8')as u:
with open(r'c:\Users\84249\Documents\lesson13-3\sales_list.txt','r',encoding='utf-8')as u:
l=u.readlines()
for i in l:
data=i.split()
sum=0
for a in data[1:]:
sum+=int(a)
print(data[0]+" "+str(sum))
\ No newline at end of file
print(l)
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