Commit cae40f6f by BellCodeEditor

save project

parent bbe9de58
Showing with 6 additions and 3 deletions
...@@ -3,5 +3,9 @@ with open(r'c:\Users\joy\Documents\lesson13-1\sales_list.txt','r',encoding="utf- ...@@ -3,5 +3,9 @@ with open(r'c:\Users\joy\Documents\lesson13-1\sales_list.txt','r',encoding="utf-
#print(a) #print(a)
for i in a: for i in a:
num=i.split() num=i.split()
print(num[0]) #print(num[0])
print(num[1:]) #print(num[1:])
\ No newline at end of file sun=0
for seles in num[1:]:
sun=sun+int(seles)
print(sun)
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