remove all elements from a list matching a string : <p>I am trying to remove all the elements from a list that contains the string "abc" from my list.</p>

<pre><code>list_a=['abc-123','abc-000','345-abc','1-abc-b','aaa','ab','xyz']
</code></pre>

<p>i am using the below method: </p>

<pre><code>for i in list_a:
   if not "abc" in list_a: list_a.remove(i)
</code></pre>

<p>when i do <code>print list_a</code> i see the response does not remove all the elements in the list that matched the criteria. I get the below response:</p>

<p><code>['abc-000', '1-abc-b', 'ab']</code></p>

<p>My Expected response is: <code>['aaa','ab','xyz']</code></p>
