Commit 509f6703 by BellCodeEditor

save project

parent a8d02629
Showing with 9 additions and 0 deletions
new_date=''
with open(r'C:\Users\CM\Desktop\test.txt','a',encoding='utf-8')as file:
for date in file:
if '小强:10本' in date:
print('数据在文件中')
new_date+=date
with open(r'C:\Users\CM\Desktop\test.txt','a',encoding='utf-8')as file:
file.write(new_date)
\ 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