Commit 052552bf by BellCodeEditor

save project

parent bab45869
Showing with 143 additions and 2 deletions
......@@ -8,4 +8,145 @@ file1.close()
with open(r"C:\Uses\CM\Desktop\book.txt","w",encoding="utf-8") as file:
file.write("小兰:12本\n")
file.write("李文:9本\n")
\ No newline at end of file
file.write("if'小兰:12本' in data:\n")
with open(r"C:\Uses\CM\Desktop\book.txt","w",encoding="utf-8") as file:
for data in file1:
if'小兰:12本' in data:
print('小兰在')
if'李文:9本' in data:
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