Commit 099d3f63 by BellCodeEditor

save project

parent b7681d7e
Showing with 14 additions and 2 deletions
...@@ -2,8 +2,19 @@ with open(r'c:\Users\86155\Documents\lesson13_2\sales_list.txt','r',encoding='ut ...@@ -2,8 +2,19 @@ with open(r'c:\Users\86155\Documents\lesson13_2\sales_list.txt','r',encoding='ut
a=file.readlines() a=file.readlines()
for i in a: for i in a:
w=i.split() w=i.split()
print(w[0]) s=0
print(w[1:]) for q in w[1:]:
s=s+int(q)
s=w[0]+str(s)
print(s)
# wereretd='刘 2 蛋 是 d s b' # wereretd='刘 2 蛋 是 d s b'
# w=wereretd.split() # w=wereretd.split()
# print(w) # print(w)
\ 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