Check in python if a list item contains a string
<p>I have a list:</p>

<pre><code>my_list = ['abc-123', 'def-456', 'ghi-789', 'abc-456']
</code></pre>

<p>and want to search for items that contain the string <code>'abc'</code>. How can I do that?</p>

<pre><code>if 'abc' in my_list:
</code></pre>

<p>would check if <code>'abc'</code> exists in the list but it just exists <code>'abc-123'</code> and <code>'abc-456'</code> and not <code>'abc'</code>. So how can I get all items that contain <code>'abc'</code> ?</p>
