Commit 518d6bef by BellCodeEditor

save project

parent 5ea0f868
Showing with 5 additions and 1 deletions
......@@ -6,4 +6,8 @@ co.write('李文:9本\n')
co.write('张伟:16本\n')
co.close()
with open(r"C:\Users\Admin\Desktop\新建文本文档.txt",'r',encoding='utf-8')as co:
for data i
for data in co:
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