title: Fastest way in Python to search if a text file contains any of the word from a list
body: <p>Using python, I want to check if a text file contains any of the word from a list?</p>
  <p>One way I can think for doing this is:</p>
  <pre><code>file_data = []
  search_words = ['one', 'two', 'three']
  with open(filePath, 'r') as f:
          file_data = f.read()
  for line in file_data:
      for single_word in search_words:
          if single_word in line.split()
              print(&quot;Found {0} in {1}&quot;.format(single_word, line))
  </code></pre>
  <p>But, is there a better way to do the same?</p>