Commit f06e07c0 by BellCodeEditor

save project

parent f3bf289b
Showing with 7 additions and 3 deletions
jg=open(r'c:\Users\Administrator\Desktop\sales_list.txt','r',encoding='utf-8') jg=open(r'c:\Users\Administrator\Desktop\sales_list.txt','r',encoding='utf-8')
b=jg.readlines() b=jg.readlines()
new_sum=''
for i in b: for i in b:
sum=0 sum=0
data=i.split() data=i.split()
for j in data[1:]: for j in data[1:]:
sum=sum+int(j) sum=sum+int(j)
print(sum) c=data[0]+str(sum)+'\n'
\ No newline at end of file new_sum=new_sum+c
b=open(r'c:\Users\Administrator\Desktop\b.txt','w',encoding='utf-8')
b.writelines(new_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