Commit db43a698 by BellCodeEditor

save project

parent 8e05789d
Showing with 10 additions and 1 deletions
...@@ -4,5 +4,13 @@ file=open(r'C:\Users\Lenovo\Desktop\book.txt','w',encoding='utf-8') ...@@ -4,5 +4,13 @@ file=open(r'C:\Users\Lenovo\Desktop\book.txt','w',encoding='utf-8')
# file.write("小丽:11本") # file.write("小丽:11本")
# file.write("李文:9本") # file.write("李文:9本")
# file.write("张伟:16本") # file.write("张伟:16本")
for data in file:
if "小兰:12本" in data:
print("yes")
else:
print("no")
if "小强:10本" in data
print("yes")
else:
print("no")
file.close() file.close()
\ 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