Commit 9cf5d039 by BellCodeEditor

save project

parent f6d6650b
Showing with 6 additions and 2 deletions
......@@ -5,5 +5,9 @@
# file1.close()
with open( r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8') as file1:
a=file1.read()
print(a)
for data in file1:
if'小丽:11本'in data:
print('数据在文件中')
else:
print("bushiren")
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