title: read a file and search for a string, if matches, return the next word in python
body: <p>I am very new to python, I am trying to do following operation:
  Read a given file ('file.txt') and search for a particular string("string") if matches, return the next word.
  'file.txt' is below:</p>
  
  <pre><code>...
  func(string=0x41004578, val=0x01)
  ...
  ...
  </code></pre>
  
  <p>So if 'string' matches in file, i want to get '0x41004578' value in return.</p>
  
  <p>How to do this? I am totally blank. I am trying following</p>
  
  <pre><code> file  = open('file.txt', 'r').read().find('string')
  </code></pre>