title: How can I remove a key from a Python dictionary?
body: <p>Is there a one-line way of deleting a key from a dictionary without raising a <code>KeyError</code>?</p>
  <pre><code>if 'key' in my_dict:
      del my_dict['key']
  </code></pre>