Commit f12232a4 by BellCodeEditor

auto save

parent 77d22e68
Showing with 12 additions and 13 deletions
with open(r'c:\Users\PC\Desktop\sales_list.txt','r',encoding='utf-8') as file:
a = file.readlines()
fanal_sum = []
for i in a:
b = i.split()
c = 0
for sales in b[1:]:
c = c+int(sales)
d = b[0]+str(c)+'\n'
fanal_sum.append(d)
with open(r'c:\Users\PC\Desktop\new_sales_list.txt','a',encoding='utf-8') as file:
file.writelines(fanal_sum)
\ No newline at end of file
import turtle as t
t.penup()
t.goto(10,10)
t.forward(100)
t.left(60)
t.forward(100)
t.right(60)
t.backward(100)
t.reset()
t.down()
print(/n)
\ 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