Commit 273b72aa by BellCodeEditor

save project

parent a9713ff8
Showing with 8 additions and 6 deletions
......@@ -7,9 +7,11 @@
# qaz.write('张伟:16本\n')
# qaz.close()
with open(r'C:\Users\Bellcode\Desktop\新建文本文档.txt','a',encoding="utf-8") as file:
file.write("鼎折覆餗:353676本\n")
new_data=" "
with open(r'C:\Users\Bellcode\Desktop\新建文本文档.txt','r',encoding="utf-8") as file:
for date in file:
if '鼎折覆餗' in date:
print("数据在文件中")
\ No newline at end of file
for data in file:
if '鼎折覆餗' in data:
data=data.replace("鼎折覆餗","发箍的")
new_data+=data
with open(r'C:\Users\Bellcode\Desktop\新建文本文档.txt','w',encoding="utf-8") as file:
file.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