Commit 0d32aa81 by BellCodeEditor

save project

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