title: How to match words in a list with user input in python?
body: <p>I am working on program which takes user input and replaces the words in a list with 'x'. 
  eg is the word is sucks and user input is "this word is sucks". the output should be "this word is xxxxx.</p>
  
  <p>this is what i have so far. how can i access the elements in the list and match with the user input?</p>
  
  <pre><code>def main():
      message = []
      words = ['drat','crap','sucks']
      counter = 0
      userInput = str(input("Enter The Sentense: "))
      truncatedInput = userInput[:140]
      sentence =  truncatedInput.split()
      for i in range(len(sentence)):
  </code></pre>