Commit 295bc56b by BellCodeEditor

save project

parent 38c94a2d
Showing with 7 additions and 0 deletions
......@@ -6,3 +6,9 @@
# filel.write('\n小强:12本\n李明:15本')
# filel.close()
with open(r'C:\Users\cheng\Desktop\test.txt','r',encoding='utf-8') as filel:
for data in filel:
if '小强:12本' 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