Commit 1e9a4af4 by BellCodeEditor

save project

parent 9da06fcf
Showing with 9 additions and 3 deletions
...@@ -2,5 +2,11 @@ with open(r"C:\Users\86185\Desktop\Python文件\money.txt",'r',encoding='UTF-8') ...@@ -2,5 +2,11 @@ with open(r"C:\Users\86185\Desktop\Python文件\money.txt",'r',encoding='UTF-8')
r=f.readlines() r=f.readlines()
for i in r: for i in r:
a=i.split() a=i.split()
print("姓名:"+i[0:2]) # print("姓名:"+i[0:2])
print("收获:"+i[3:]) # print("收获:"+i[1:])
\ No newline at end of file print(a)
b=0
for h in a[1:]:
b=b+int(h)
c=a[0]+str(b)
print(c)
\ 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