📅  最后修改于: 2022-03-11 14:45:47.707000             🧑  作者: Mango
import mmap
with open('example.txt') as f:
s = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
if s.find('blabla') != -1:
print('true')