Commit d4dc6e84 by BellCodeEditor

save project

parent 11009532
Showing with 9 additions and 5 deletions
with open(r'c:\Users\Windows 10\Documents\lesson13-1\sales_list.txt',"r",encoding="UTF-8") as a: with open(r'c:\Users\Windows 10\Documents\lesson13-1\sales_list.txt',"r",encoding="UTF-8") as a:
b=a.readlines() b=a.readlines()
# for i in b:
# c=i.split()
# print(c[0])
for i in b: for i in b:
c=i.split() c=i.split()
print(c[0]) num=0
for i in b: for q in c[1:]:
c=i.split() num+=int(q)
print(c[1:]) print(num)
\ No newline at end of file \ 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