Commit d5f39562 by BellCodeEditor

save project

parent 64c8ec61
Showing with 6 additions and 3 deletions
with open(r'C:\Users\Administrator\Desktop\text.txt','r',encoding='utf-8') as a: with open(r'C:\Users\Administrator\Desktop\text.txt','r',encoding='utf-8') as a:
new_a='' n=''
b=''
for a_1 in a: for a_1 in a:
if '小强:10本' in a_1: if '小强:10本' in a_1:
b=a_1.replace('小强:10本','小强:11本') b=a_1.replace('小强:10本','小强:11本')
new_a+=b n+=b
print(new_a) with open(r'C:\Users\Administrator\Desktop\text.txt','w',encoding='utf-8') as a:
a.write(n)
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