Commit fc70309d by BellCodeEditor

save project

parent af406c84
Showing with 16 additions and 0 deletions
with open (r'/Users/edz/Desktop/sales_list.txt','r',encoding='utf-8') as file:
a=file.readlines()
#print(a)
gp=[]
for i in a:
b=i.split()
c=b[1:]
d=0
for e in c:
d+=int(e)
f=b[0]+str(d)+'\n'
gp+=f
with open(r'/Users/edz/Desktop/sales_salelist.txt','a',encoding='utf-8') as file:
file.writelines(gp)
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