title: Silently removing key from a python dict
body: <p>I have a python dict and I'd like to silently remove either <code>None</code> and <code>''</code> keys from my dictionary so I came up with something like this:</p>
  
  <pre><code>try:
      del my_dict[None]
  except KeyError:
      pass
  
  try:
      del my_dict['']
  except KeyError:
     pass
  </code></pre>
  
  <p>As you see, it is less readable and it causes me to write duplicate code. So I want to know if there is a method in python to remove any key from a dict without throwing a key error?</p>