python 3a search file for string

Solutions on MaxInterview for python 3a search file for string by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "python 3a search file for string"
Hadrien
13 Jan 2020
1import mmap
2
3with open('example.txt') as f:
4    s = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
5    if s.find('blabla') != -1:
6        print('true')
7
similar questions
queries leading to this page
python 3a search file for string