Removing multiple keys from a dictionary safely
<p>I know to remove an entry, 'key' from my dictionary <code>d</code>, safely, you do:</p>

<pre><code>if d.has_key('key'):
    del d['key']
</code></pre>

<p>However, I need to remove multiple entries from dictionary safely.  I was thinking of defining the entries in a tuple as I will need to do this more than once.</p>

<pre><code>entitiesToREmove = ('a', 'b', 'c')
for x in entitiesToRemove:
    if d.has_key(x):
        del d[x]
</code></pre>

<p>However, I was wondering if there is a smarter way to do this?</p>

<p>Any help appreciated.</p>
