Commit a6d0df4e by BellCodeEditor

save project

parent c12fd7e9
Showing with 14 additions and 0 deletions
# ay=open(r'C:\Users\Administrator\Desktop\book.txt','w',encoding='uft-8')
# ay.write('小兰:12本')
#ay.write('小丽:12本')
#ay.write('李文:9本')
#ay.write('张伟:16本')
#ay.close()
with open(r'C:\Users\Administrator\Desktop\book.txt','r',encoding='uft-8')as file1:
for data in file1:
if data in file1:
if'小强:10本'in data:
print('数据在文件中')
\ 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