Commit 34849187 by BellCodeEditor

save project

parent 7ce266c6
Showing with 6 additions and 0 deletions
...@@ -2,3 +2,9 @@ with open(r"c:\Users\Lenovo、\Documents\lesson13-1\sales_list.txt","r",encoding ...@@ -2,3 +2,9 @@ with open(r"c:\Users\Lenovo、\Documents\lesson13-1\sales_list.txt","r",encoding
a=file1.readlines() a=file1.readlines()
print(type(a[1:])) print(type(a[1:]))
print(a[1:]) print(a[1:])
for i in a:
date=i.split()
sum=0
for sales in date[1:]:
sum=sum+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