title: Search external file for specific word and store the very next word in variable in Python
body: <p>I have a file that has a line similar to this:</p>
  
  <pre><code>"string" "playbackOptions -min 1 -max 57 -ast 1 -aet 57
  </code></pre>
  
  <p>now i want to search the file and extract and store the value after " -aet" (in this case 57) in a variable.</p>
  
  <p>I'm using </p>
  
  <pre><code>import mmap
  
  with open('file.txt') as f:
      s = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
      if s.find('-aet') != -1:
          print('true')
  </code></pre>
  
  <p>for searching. but can't go beyond this.</p>