Commit c3a28780 by BellCodeEditor

save project

parent 9f9b20cb
Showing with 7 additions and 9 deletions
#with open(r"C:\Users\Windows 10\Desktop\text.txt","a",encoding="utf-8") as fileq: with open(r"C:\Users\Windows 10\Desktop\text.txt","r",encoding="utf-8") as fileq:
#fileq.write("小兰:12本\n") for data in fileq:
#fileq.write("小红:12本\n") if "小强:10本"in data:
#fileq.write("小包:12本\n") print("数据在文件中")
#fileq.write("小梅:12本\n") else:
fileq=open(r"C:\Users\Windows 10\Desktop\text.txt","r","encoding=utf-8") print("数据不在文件中")
a=fileq.read() \ No newline at end of file
fileq.close()
\ 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