Commit a7ca3e15 by BellCodeEditor

save project

parent e9886ef5
Showing with 6 additions and 2 deletions
...@@ -3,4 +3,8 @@ with open(r'c:\Users\玛酷001\Documents\lesson13-1\sales_list.txt',"r",encodin ...@@ -3,4 +3,8 @@ with open(r'c:\Users\玛酷001\Documents\lesson13-1\sales_list.txt',"r",encodin
# print(a) # print(a)
for i in a: for i in a:
a=i.split() a=i.split()
print(a[1:]) # print(a[1:])
\ No newline at end of file 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