Commit 2e24c73d by BellCodeEditor

auto save

parent 7e6a68cf
Showing with 3 additions and 4 deletions
......@@ -4,6 +4,5 @@ with open(r'C:\Users\Administrator\Desktop\text.txt','r',encoding='utf-8')as fil
if '小强:10本'in data:
data=data.replace('小强:10本','小强:11本')
new_data+=data
file1 = open(r'C:\Users\Administrator\Desktop\text.txt','w',encoding='utf-8')
file1.write('小强:10本/n')
#file1.write(new_data)
\ No newline at end of file
with open(r'C:\Users\Administrator\Desktop\text.txt','w',encoding='utf-8') as file2:
file2.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