Commit 298c7088 by BellCodeEditor

save project

parent a8d02629
Showing with 16 additions and 0 deletions
name = input("请输入你要查找的用户:")
find = False
newDate = ''
with open(r'C:\Users\Lenovo\Desktop\1.txt','r',encoding='utf-8') as file:
for date in file:
if name in date:
find = True
data.replace(name , "光头强")
print("找到了")
newData += data
if find == False:
print("没找到")
with open(r'C:\Users\Lenovo\Desktop\1.txt','w',encoding='utf-8') as file:
file.write(newDate)
with open(r'C:\Users\Lenovo\Desktop\1.txt','r',encoding='utf-8') as file:
\ 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