Commit 946436f3 by BellCodeEditor

save project

parent bb05756f
Showing with 0 additions and 9 deletions
new_data=""
with open(r'C:\Users\PC\Desktop\123\zhangxiaofan.txt',"r",encoding="utf_8")as file1:
for data in file1:
if "xiaogangn"in data:
data=data.replace("xiaogangn","1")
new_data+=data
with open(r'C:\Users\PC\Desktop\123\zhangxiaofan.txt',"w",encoding="utf_8")as file1:
file1.write(new_data)
\ 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