Commit b521b31c by BellCodeEditor

save project

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