Commit 7b6f8f9e by BellCodeEditor

save project

parent 5dbcf747
Showing with 9 additions and 0 deletions
with open(r'c:\Users\mayi\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file1: with open(r'c:\Users\mayi\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file1:
a=file1.readlines() a=file1.readlines()
print(a) print(a)
for i in a:
b=i.split()
print(b[0])
c=0
for d in b[1:] :
c+=int(d)
print(c)
with open(r'c:\Users\mayi\Documents\lesson13-1\sales_list.txt','w',encoding='utf-8') as test:
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