Commit 4fc7bf60 by BellCodeEditor

save project

parent 5c45a18c
Showing with 8 additions and 4 deletions
with open(r'c:\Users\Thinkpad\Documents\lesson13-1\sales_list.txt ','r',encoding='utf-8')as file1:
a=file1.readlines()
cunt=0
count=0
e=[]
for i in a:
b=i.split()
count=0
for j in b[1:]:
cunt+=int(j)
print(cunt)
cunt=0
count+=int(j)
e.append((b[0]+str(count)
with open(r'c:\Users\Thinkpad\Documents\lesson13-1\sales_list.txt ','a',encoding='utf-8')as file1:
file1.writelines(e)
\ 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