Commit 8c2e93e0 by BellCodeEditor

save project

parent b838783c
Showing with 8 additions and 4 deletions
# asq=open(r"C:\Users\Administrator\Desktop\fdf.txt","w",encoding="utf-8") # asq=open(r"C:\Users\Administrator\Desktop\fdf.txt","w",encoding="utf-8")
# asq.write("小蓝12") # asq.write("小蓝:12")
# asq.close() # asq.close()
with open(r"C:\Users\Administrator\Desktop\fdf.txt","a",encoding="utf-8")as asq: # with open()as asq:
asq.write("小蓝:12\n小机:6\n小笑:5\n") # asq.write("小蓝:12\n小机:6\n小笑:5\n")
\ No newline at end of file with open(r"C:\Users\Administrator\Desktop\fdf.txt","r",encoding="utf-8")as asq:
for i in asq:
print(i)
if "12" in i:
print("找到了")
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