Python deleting from a dictionary using list comprehensions
<p>I'm trying to be a good pythonista and use list comprehensions where possible...</p>

<p>Why doesn't this work?</p>

<pre><code>[del my_dict[r] for r in to_remove]
</code></pre>

<p>The goal is to remove the entries in the list <code>to_remove</code> from my dict object <code>my_dict</code>
This:</p>

<pre><code>for r in to_remove:
  del my_dict[r]
</code></pre>

<p>works fine but I am trying to do it with list comprehensions </p>
