Commit 306e4fbf by BellCodeEditor

save project

parent ebc907ad
Showing with 7 additions and 5 deletions
with open(r'c:\Users\Admin\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as filel: with open(r'c:\Users\Admin\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as filel:
a = filel.readlines() a = filel.readlines()
#print(a) #print(a)
for in a: for i in a:
print(i) #print(i)
b=i.split()
sum = 0
for sales in b[1:]:
sum = sum +int(sales)
print(sum)
......
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