Commit 1ce71ac2 by BellCodeEditor

auto save

parent dce56255
Showing with 13 additions and 3 deletions
with open(r'/Users/zll/Desktop/sales_list.txt','r',encoding='utf-8') as f : with open(r'/Users/zll/Desktop/sales_list.txt','r',encoding='utf-8') as f:
a=f.readlines() a=f.readlines()
print(a)
\ No newline at end of file zz=[]
for i in a:
aa=i.split()
sum=0
for x in aa[1:]:
sum=sum+int(x)
qq=aa[0]+str(sum)
zz.append(qq)
print(zz)
\ 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