Commit fe8d7293 by BellCodeEditor

save project

parent c8d83b92
Showing with 8 additions and 3 deletions
......@@ -5,5 +5,10 @@
#file.write("李文:9本\n")
#file.write("张伟:16本\n")
#file.close()
with open(r"C:\Users\EDY\Desktop\10086.txt","a",encoding="utf-8") as files:
files.write("坤坤: 114514本\n")
\ No newline at end of file
with open(r"C:\Users\EDY\Desktop\10086.txt","r",encoding="utf-8") as files:
a=files.read()
# print(a)
if "坤坤: 114514本" in data:
print("该数据在里面")
else:
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