Commit cc29e9e8 by BellCodeEditor

save project

parent 009ca3d3
Showing with 6 additions and 2 deletions
with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as a: with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as a:
d=a.readlines() d=a.readlines()
y=[]
for i in d: for i in d:
b=i.split() b=i.split()
#print(b) #print(b)
j=0 j=0
for s in b[1:]: for s in b[1:]:
j=j+int(s) j=j+int(s)
print(b[0]+str(j)) p=(b[0]+str(j))+'\n')
\ No newline at end of file y.append(p)
with open()
c.writelan
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