title: Finding a substring within a list in Python
body: <h3>Background:</h3>
  <p>Example list: <code>mylist = ['abc123', 'def456', 'ghi789']</code></p>
  <p>I want to retrieve an element if there's a match for a substring, like <code>abc</code></p>
  <h3>Code:</h3>
  <pre><code>sub = 'abc'
  print any(sub in mystring for mystring in mylist)
  </code></pre>
  <p>above prints <code>True</code> if any of the elements in the list contain the pattern.</p>
  <p>I would like to print the element which matches the substring. So if I'm checking <code>'abc'</code> I only want to print <code>'abc123'</code> from list.</p>