Commit cd7382a7 by BellCodeEditor

save project

parent 4fbd030d
Showing with 9 additions and 3 deletions
nr=[]
line=[]
file=0
with open(r"C:\Users\Administrator\Documents\lesson13_2\sales_list.txt","r",encoding="utf-8")as file:
nr=file.readlines()
for i in nr:
line=i.split()
print(line[0])
print(line[1:])
\ No newline at end of file
#print(line[0])
#print(line[1:])
sum=0
for sales in line[1:]:
sum=sum+int(sales)
print(sum)
\ 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