Commit 81680e48 by BellCodeEditor

save project

parent 42fe4eb3
Showing with 5 additions and 1 deletions
Left=[]
with open(r'c:\Users\Administrator\Desktop\sales_list.txt','r',encoding = 'utf-8') as file1:
a=file1.readlines()
for i in a:
......@@ -5,5 +6,8 @@ with open(r'c:\Users\Administrator\Desktop\sales_list.txt','r',encoding = 'utf-8
s=0
for x in data[1:]:
s+=int(x)
print(data[0]+str(s))
Left.append(data[0]+str(s)+'\n')
with open(r'c:\Users\Administrator\Desktop\sale_list.txt','w',encoding = 'utf-8') as f:
f.writelines(Left)
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