Commit 02da33f0 by BellCodeEditor

save project

parent f39c581f
Showing with 2 additions and 1 deletions
...@@ -13,7 +13,7 @@ z='' ...@@ -13,7 +13,7 @@ z=''
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8') as a: with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8') as a:
for i in a: for i in a:
if '小强:12本' in i: if '小强:12本' in i:
i=i.relace('小强:12本','小强:11本') i=i.replace('小强:12本','小强:11本')
z+=i z+=i
with open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding='utf-8') as a: with open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding='utf-8') as a:
a.write(z) a.write(z)
\ 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