title: Python how to find exact match in a list and not just contained in a word within list
body: <p>I'm trying to find an exact match for a word in a list of words either in a [] list or a list from a text document separated by a word per line. But using "in" returns true if the word is contained in the list of words. I'm looking for an exact match. For example in python 2.7.12:</p>
  
  <pre><code>mylist = ['cathrine', 'joey', 'bobby', 'fredrick']
  
  for names in mylist:
      if 'cat' in names:
          print 'Yes it is in list'
  </code></pre>
  
  <p>this will return true, but I i want it to only be true if it's an exact match. 'cat' should not return true if 'cathrine' is in mylist.</p>
  
  <p>and trying to use "if 'cat' == names:' does't seem to work.</p>
  
  <p>How would I go about returning true only if the string I'm looking for is an exact match of a list of words, and not contained within a word of a list of words?</p>