Commit 1445f195 by BellCodeEditor

save project

parent 7721e4b2
Showing with 6 additions and 2 deletions
with open(r'C:\Users\Administrator\Desktop\新建文件夹\sb.txt','w',encoding='utf-8') as file:
file.write('小兰:12本\n')
\ No newline at end of file
for data in file:
if '小兰:10本'in data:
print('数据在文件夹中')
else:
print('数据不在文件夹中')
\ 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