Commit ac65ddd4 by BellCodeEditor

save project

parent 2853224c
Showing with 11 additions and 1 deletions
new_cctv=" "
with open(r"C:\Users\Administrator\Desktop\jainznegminglu.txt","r",encoding="utf-8")as cctv: with open(r"C:\Users\Administrator\Desktop\jainznegminglu.txt","r",encoding="utf-8")as cctv:
for data in cctv: for data in cctv:
if "张伟:16本" in data: if "张伟:16本" in data:
print("张伟在文件夹中") data=data.replace("张伟:16本","张伟:12本")
new_cctv=new_cctv+data
with open(r"C:\Users\Administrator\Desktop\jainznegminglu.txt","w",encoding="utf-8")as cctv:
cctv.write(new_cctv)
with open(r"C:\Users\Administrator\Desktop\jainznegminglu.txt","r",encoding="utf-8")as cctv:
print(cctv.read())
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