Commit 2a64ccb9 by BellCodeEditor

auto save

parent b521b31c
Showing with 4 additions and 3 deletions
new_b='' new_b=''
with open(r'C:\Users\DELL\Desktop\test.txt','r',encoding='utf-8') as file1: with open(r'C:\Users\DELL\Desktop\tetw','r',encoding='utf-8') as file1:
for b in file1: for b in file1:
if'小强10本'in b: if'小强:10本'in b:
b=b.replace('小强:10本','小强:11本') b=b.replace('小强:10本','小强:11本')
new_b +=b new_b +=b
with open(r'C:\Users\DELL\Desktop\test.txt','r',encoding='utf-8') as file1: with open(r'C:\Users\DELL\Desktop\tetw','w',encoding='utf-8') as file1:
file1.write(new_b) file1.write(new_b)
\ 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