Commit 9a3f3d9d by BellCodeEditor

save project

parent 98a9eeb5
Showing with 6 additions and 6 deletions
with open('C:\\Users\\Public\\Desktop\\lm.txt','r',encoding='utf-8') as file1:
for lm in file1:
if '小兰:12' in lm:
print('sb在文件中')
new_data=''
with open('C:\\Users\\Public\\Desktop\\lm.txt','w',encoding='utf-8') as file1:
for data in file1:
if "小兰:12" in lm
data=data.replace('小兰:12,小兰:13')
new_data +=data
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