Commit 3862502e by BellCodeEditor

auto save

parent 1f29195a
Showing with 7 additions and 2 deletions
with open(r'c:\Users\Lenovo\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file: with open(r'c:\Users\Lenovo\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file:
w=file.readlines() w=file.readlines()
for i in w: for i in w:
print(i)
d=i.split() d=i.split()
print(d) sum=0
for s in d[1: ]:
sum+=int(s)
wee=d[0]+str(sum)
print(wee)
......
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