Commit 17482627 by BellCodeEditor

save project

parent 9a38e390
Showing with 7 additions and 2 deletions
...@@ -3,5 +3,9 @@ ...@@ -3,5 +3,9 @@
# ll.write('小兰:12本\n') # ll.write('小兰:12本\n')
# ll.write("张伟:16本\n") # ll.write("张伟:16本\n")
# ll.close() # ll.close()
with open(r'C:\Users\Administrator\Desktop\kk.txt','a',encoding='utf-8')as file: # with open(r'C:\Users\Administrator\Desktop\kk.txt','a',encoding='utf-8')as file:
file.write("小兰:12本\n") # file.write("小兰:12本\n")
with open(r'C:\Users\Administrator\Desktop\kk.txt','r',encoding='utf-8')as file:
for i in file:
if "小兰" in i:
print("Yes")
\ 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