Commit 48d27a10 by BellCodeEditor

auto save

parent 5ec53ebb
Showing with 16 additions and 0 deletions
with open(r'C:\Users\A16\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8')as sb:
a=sb.readlines()
l=[]
for i in a:
k=0
m=i.split()
for s in m[1:]:
k = k+int(s)
x=m[0]+str(k)+"\n"
l.append(x)
print(l)
#with open(r'C:\Users\A16\Documents\lesson13-1\sales_list.txt','a',encoding='utf-8')as sb:
#sb.withlines(f)
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