title: How do I check existence of a string in a list of strings, including substrings?
body: <p>I have written a function to check for the existence of a value in a list and return True if it exists.  It works well for exact matches, but I need for it to return True if the value exists anywhere in the list entry (e.g. value &lt;= listEntry, I think.)  Here is the code I am using for the function:</p>
  
  <pre><code>def isValInLst(val,lst):
      """check to see if val is in lst.  If it doesn't NOT exist (i.e. != 0), 
      return True. Otherwise return false."""
      if lst.count(val) != 0:
          return True
      else:
          print 'val is '+str(val)
          return False
  </code></pre>
  
  <p>Without looping through the entire character string and/or using RegEx's (unless those are the most efficient), how should I go about this in a pythonic manner?</p>
  
  <p>This is very similar to <a href="https://stackoverflow.com/questions/3389574/check-if-multiple-strings-exist-in-another-string">another SO question</a>, but I need to check for the existence of the ENTIRE val string anywhere in the list.  It would also be great to return the index / indices of matches, but I'm sure that's covered elsewhere on Stackoverflow.</p>