Commit 70f73650 by BellCodeEditor

auto save

parent 2fdcdf7c
Showing with 4 additions and 10 deletions
with open(r"c:\Users\Administrator\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8") as file: with open(r"c:\Users\Administrator\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8")as file:
c=file.readlines() c=file.read()
for i in c: print(c)
a=i.split() \ No newline at end of file
print(a[1:])
sum=0
for sales in a[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