Commit af92240d by BellCodeEditor

auto save

parent e5bbd8a1
new=''
with open(r"C:\Users\Administrator\Desktop\dhj.txt",'r',encoding='utf-8') as file:
for date in file:
if '小fd: 16本' in date:
print("in it")
date=date.replace('小fd: 16本','小p:13本')
new+=date
\ No newline at end of file
with open(r"C:\Users\Administrator\Desktop\dhj.txt",'a',encoding='utf-8') as file:
file.write('小p:16本\n')
with open(r"C:\Users\Administrator\Desktop\dhj.txt",'w',encoding='utf-8') as file:
file.write('小a:16本\n')
\ 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