Commit b51b9643 by BellCodeEditor

save project

parent 0b20a697
Showing with 1 additions and 0 deletions
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
# with open(r"C:\Users\Administrator\Desktop\book.txt","a",encoding="utf-8") as file: # with open(r"C:\Users\Administrator\Desktop\book.txt","a",encoding="utf-8") as file:
# file.write("小强:12本\n") # file.write("小强:12本\n")
# file.write("李明:15本\n") # file.write("李明:15本\n")
new_data=""
with open(r"C:\Users\Administrator\Desktop\book.txt","r",encoding="utf-8") as file: with open(r"C:\Users\Administrator\Desktop\book.txt","r",encoding="utf-8") as file:
for data in file: for data in file:
if "小强:10本" in data: if "小强:10本" in data:
......
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