Commit 560e2165 by BellCodeEditor

save project

parent 5ec53ebb
Showing with 15 additions and 0 deletions
with open (r'sales_list.txt','r',encoding='utf-8' )as file:
a=file.readlines()
final_sum=[]
for i in a:
list1=i.split()
# print(list1[1:])
sum=0
for t in list1[1:]:
sum=sum+int(t)
s=list1[0]+str(sum)
print(s)
final_sum.append(result)
with open (r'new_saleist.txt','a',encoding='utf-8')as file:
file.writelines(final_sum)
\ 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