Commit 689b41ab by BellCodeEditor

save project

parent c1f27732
Showing with 4 additions and 19 deletions
with open(r'c:\Users\EDZ\Documents\lesson13-4\sales_list.txt','r',encoding='utf-8')as a: with open(r'c:\Users\EDZ\Desktop\test.txt','r',encoding='utf-8')as a:
z=a.readlines() z=a.readlines()
shuru=[] for i in z:
for i in z: i=i.split()
i=i.split() print(i[1:])
sum=0
for j in i[1:]:
sum=sum+int(j)
hang=(i[0]+str(sum)+"\n")
shuru.append(hang)
with open(r'C:\Users\EDZ\Desktop\qq.txt','w',encoding='utf-8')as c:
c.writelines(shuru)
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