Commit 2d930fdd by BellCodeEditor

save project

parent 9c10b957
Showing with 5 additions and 2 deletions
...@@ -2,4 +2,8 @@ with open(r'C:\Users\百思01\Desktop\test.txt','r',encoding='utf-8') as file: ...@@ -2,4 +2,8 @@ with open(r'C:\Users\百思01\Desktop\test.txt','r',encoding='utf-8') as file:
a=file.readlines() a=file.readlines()
for i in a: for i in a:
b=i.split() b=i.split()
print(b[1:]) sum=0
\ No newline at end of file for sales in b[1:]:
sum=sum+int(sales)
result=b[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