Commit 485164aa by BellCodeEditor

save project

parent b5bc3cfa
Showing with 6 additions and 1 deletions
......@@ -7,5 +7,10 @@ filel.close()
with open(r"C:\Users\辰辰\Desktop\book.txt","a",encoding='utf-8') as filel:
filel.write('田俊浩:25本')
with open(r"C:\Users\辰辰\Desktop\book.txt","r",encoding='utf-8') as filel:
for i in filel:
if '小强:10本' in i:
print('数据在里面')
else:
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