Commit e29d4aa3 by BellCodeEditor

save project

parent c6cc14f7
Showing with 9 additions and 2 deletions
...@@ -4,5 +4,11 @@ ...@@ -4,5 +4,11 @@
# hhh.write('小丽:11本') # hhh.write('小丽:11本')
# hhh.write('李文:9本') # hhh.write('李文:9本')
# hhh.close() # hhh.close()
with open(r'C:\Users\Administrator\Desktop\hhh.txt','a',encoding='utf-8')as hhh: h=''
hhh.write('小兰:12本\n') with open(r'C:\Users\Administrator\Desktop\hhh.txt','r',encoding='utf-8')as hhh:
for i in hhh:
if '小兰' in i:
i=i.replace('12','100000000')
h=h+i
with open(r'C:\Users\Administrator\Desktop\hhh.txt','w',encoding='utf-8')as hhh:
hhh.write(h)
\ 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