Commit 7c1a9353 by BellCodeEditor

save project

parent 47ddcd19
Showing with 7 additions and 3 deletions
......@@ -9,5 +9,10 @@
#with open(r"C:\Users\Administrator\Desktop\book.txt",'a',encoding='utf-8')as ffdh:
#ffdh.write('小强12本\n')
# ffdh.write('李明15本\n')
with open(r"C:\Users\Administrator\Desktop\book.txt",'r',encoding='utf-8')
if "小强"
\ No newline at end of file
with open(r"C:\Users\Administrator\Desktop\book.txt",'r',encoding='utf-8')as ffdh:
for a in ffdh:
if "小强10本" in a:
print('小强在文件中')
if "小丽12本" in a:
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