Commit ad9fcecc by BellCodeEditor

save project

parent 51f7f674
Showing with 7 additions and 0 deletions
...@@ -6,3 +6,10 @@ with open(r'c:\Users\jd\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8 ...@@ -6,3 +6,10 @@ with open(r'c:\Users\jd\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8
for i in a: for i in a:
print(data[1:]) print(data[1:])
for i in a:
data=i.split()
sum=0
for sales to data[1:]:
sum=sum+int(sales)
resuit=data[0]+str(sum)
print(result)
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