Commit 036c887b by BellCodeEditor

save project

parent 54c769f9
Showing with 14 additions and 3 deletions
c = 0
with open(r'C:\Users\Administrator\Documents\lesson13_2\sales_list.txt','r',encoding = 'utf-8') as file: with open(r'C:\Users\Administrator\Documents\lesson13_2\sales_list.txt','r',encoding = 'utf-8') as file:
a = file.readlines() a = file.readlines()
# print(a)
for i in a: for i in a:
b=i.split()
print(b[0],b[1:]) b = i.split()
for n in b[1:]:
c += int(n)
print( b[0] , c )
c = 0
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