Commit 81a8e7ab by BellCodeEditor

save project

parent 8493e6ba
Showing with 8 additions and 3 deletions
...@@ -3,5 +3,10 @@ with open(r'C:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',enco ...@@ -3,5 +3,10 @@ with open(r'C:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',enco
for i in a: for i in a:
# print(i) # print(i)
hmz=i.split() hmz=i.split()
print(hmz[1:]) # print(hmz[1:])
print(hmz[0]) # print(hmz[0])
\ No newline at end of file sum=0
for hjx in hmz[1:]:
sum=sum+int(hjx)
result=hmz[0]+str(sum)
print(result)
\ 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