Delete similar items that start the same from a list
<p>For example, I have this list:</p>

<pre><code>list = ["192.168.1.1", "0.1.2.3", "0.2.3.4", "192.168.1.2", "0.3.4.5", "192.168.1.3"]
</code></pre>

<p>How can I remove with a command all the items that start with <code>"0."</code>?</p>

<p>With <code>filter()</code>:</p>

<pre><code>lst = ["192.168.1.1", "0.1.2.3", "0.2.3.4", "192.168.1.2", "0.3.4.5, 192.168.1.3"]
new_lst = list(filter(lambda x: x if not x.startswith("0") else None, lst))
print(new_lst)
</code></pre>

python list python-3.x