Commit 900b49f7 by BellCodeEditor

auto save

parent 86958793
Showing with 9 additions and 12 deletions
with open("C:\\Users\\1\\Desktop\\sales_list.txt",'r',encoding='utf-8') as file:
a=file.readlines()
final_sum=[]
for i in a:
b=i.split()
sum=0
for sales in b[1:]:
d=sum+int(sales)
t=b[0]+str(d)+'\n'
final_sum.append(t)
with open('C:\\Users\\1\\Desktop\\test.txt','w',encoding='utf-8') as file:
file.writelines(final_sum)
import turtle as t
t.goto(0,100)
t.forward(100)
t.left(120)
t.forward(100)
t.right(60)
t.backward(10)
t.reset()
t.done()
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