Single line of code to check for a key in a 2D nested inner dictionary
<p>Is there a single line method to check whether a Python 2d dict has an inner key/value?</p>

<p>Right now i do somethng like this:</p>

<pre><code>if d.has_key(k1):
    if d[k1].has_key(k2): 
        # do something
</code></pre>

<p>Is there a better way to do this?</p>

<p>Thanks</p>
