Commit 1b7de2fc by BellCodeEditor

save project

parent 1ec9d259
Showing with 5 additions and 4 deletions
......@@ -2,6 +2,8 @@ with open("c:\\Users\\可可\\Documents\\lesson13-1\\sales_list.txt","r",encodin
b=a.readlines()
for i in b:
data=i.split()
print(data[0])
print(data[1:])
\ No newline at end of file
sum=0
for d in data[1:]:
sum=sum+int(d)
n=data[0]+str(sum)
print(n)
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