Commit c9d55894 by BellCodeEditor

auto save

parent d1536a55
Showing with 13 additions and 0 deletions
with open('sales_list.txt','r',encoding='utf-8') as f:
file=f.readlines()
list=[]
for i in file:
data=i.split()
sum=0
for j in data[1:]:
sum=sum+int(j)
s=data[0]+str(sum)+'\n'
list.append(s)
with open('GM.txt','w',encoding='utf-8') as f1:
f1.writelines(list)
\ 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