title: Python - Search Text File For Any String In a List
body: <p>Apologies is this is against the rules. I have tried creating a simple Python script that searches a text file for any of the strings in a list.</p>
  
  <pre><code>KeyWord =['word', 'word1', 'word3']
  
  if x in Keyword in open('Textfile.txt').read():
      print('True')
  </code></pre>
  
  <p>When i'm running the code I am getting a "name error: name 'x' is not defined" although i'm not sure why?</p>