Commit 3838dad6 by BellCodeEditor

save project

parent ae9abc0d
Showing with 5 additions and 1 deletions
......@@ -2,4 +2,8 @@ with open(r'c:\Users\栩栩\Documents\lesson13-1\sales_list.txt','r',encoding =
a = file.readlines()
for i in a:
data = i.split()
print(data[0] , data[1:])
w = 0
for k in data[1:]:
w = w+int(k)
nm = data[0]+':'+str(w)
print(nm)
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