Commit d87c3ac7 by BellCodeEditor

save project

parent c4e523ef
Showing with 6 additions and 4 deletions
with open(r'C:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as a: with open(r'C:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as a:
b=a.readlines() b=a.readlines()
ha=[]
for i in b: for i in b:
haha=i.split() haha=i.split()
hahaha=0 hahaha=0
for hahahaha in haha[1:]: for hahahaha in haha[1:]:
hahaha=hahaha+int(hahahaha) hahaha=hahaha+int(hahahaha)
hahahahaha=haha[0]+str(hahaha) hahahahaha=haha[0]+str(hahaha)+'/n'
print(hahahahaha) ha.append(hahahahaha)
\ No newline at end of file with open(r'C:\Users\Administrator\Documents\lesson13-1\sales_list.txt','a',encoding='utf-8') as a:
a.writelines(ha)
\ 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