Commit ad9fcecc by BellCodeEditor

save project

parent 51f7f674
Showing with 8 additions and 2 deletions
...@@ -5,4 +5,11 @@ with open(r'c:\Users\jd\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8 ...@@ -5,4 +5,11 @@ with open(r'c:\Users\jd\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8
print(i) print(i)
for i in a: for i in a:
print(data[1:]) print(data[1:])
\ No newline at end of file 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