Commit 67e02b93 by BellCodeEditor

save project

parent 377e2678
Showing with 6 additions and 3 deletions
......@@ -11,6 +11,9 @@ file.write("小强: 10\n")
file.write("李明: 15\n")
file.close()
with=open(r"C:\Users\dell\Desktop\新建文本文档.txt",'r',encoding='utf-8') as file1:
for date in file1
with open(r"C:\Users\dell\Desktop\新建文本文档.txt",'r',encoding='utf-8') as file1:
for date in file1:
if "小强: 10本" in data:
print("小强在数据文件中")
if "小兰: 12本" in data:
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