Commit 0d86c213 by BellCodeEditor

save project

parent 6bb9a331
Showing with 4 additions and 4 deletions
with open(r"C:\Users\win10\Desktop\1.txt",'a',encoding='utf-8')as f:
f.write('\n小伟:10本\n')
with open(r"C:\Users\win10\Desktop\1.txt",'r',encoding='utf-8')as f:
if '小强:10本' in f:
with open(r"C:\Users\win10\Desktop\1.txt",'a',encoding='utf-8')as file1:
file1.write('\n小伟:10本\n')
with open(r"C:\Users\win10\Desktop\1.txt",'r',encoding='utf-8')as file1:
if '小强:10本' in file1:
print('数据在文件中')
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