Commit 1d6c65b6 by BellCodeEditor

auto save

parent c9f23091
Showing with 3 additions and 2 deletions
......@@ -6,9 +6,9 @@ for i in a:
data=i.split()
for n in data[1:]:
sum=sum+int(n)
c=data[0]+str(sum)
c=data[0]+str(sum)+'\n'
o.append(c)
print(o)
with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','a',encoding='utf-8') as file:
with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','w',encoding='utf-8') as file:
file.writelines(o)
\ 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