Commit aae66279 by BellCodeEditor

save project

parent 60d6c048
Showing with 11 additions and 0 deletions
......@@ -9,10 +9,21 @@ with open(r'C:\Users\makcoo\Desktop\墨有余温.权威.txt',"a",encoding='utf-8
file=open(r'C:\Users\makcoo\Desktop\墨有余温.权威.txt',"a",encoding='utf-8')
file.write('张伟:16本')
file.close()
k=""
file=open(r'C:\Users\makcoo\Desktop\墨有余温.权威.txt',"r",encoding='utf-8')
for i in file:
if "张伟" in i:
print("在")
i=i.replace("张伟:16本","张伟:20本")
k+=i
file.close()
file=open(r'C:\Users\makcoo\Desktop\墨有余温.权威.txt','w',encoding='utf-8')
file.write(k)
file.close()
file=open(r'C:\Users\makcoo\Desktop\墨有余温.权威.txt',"r",encoding='utf-8')
a=file.read()
print(a)
......
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