Commit bb86d04d by BellCodeEditor

save project

parent 59f687ca
Showing with 7 additions and 0 deletions
# with open(r"C:\Users\86155\Desktop\book.txt","w",encoding="utf-8") as file:
# file.write("小强:10本\n")
# file.write("小兰:12本")
with open(r"C:\Users\86155\Desktop\book.txt","r",encoding="utf-8") as file:
for a in file:
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