title: How to use dict.get() with multidimensional dict?
body: <p>I have a multidimensional dict, and I'd like to be able to retrieve a value by a key:key pair, and return 'NA' if the first key doesn't exist. All of the sub-dicts have the same keys.</p>
  <pre><code>d = {   'a': {'j':1,'k':2},
          'b': {'j':2,'k':3},
          'd': {'j':1,'k':3}
      }
  </code></pre>
  <p>I know I can use <code>d.get('c','NA')</code> to get the sub-dict if it exists and return 'NA' otherwise, but I really only need one value from the sub-dict. I'd like to do something like <code>d.get('c['j']','NA')</code> if that existed.</p>
  <p>Right now I'm just checking to see if the top-level key exists and then assigning the sub-value to a variable if it exists or <code>'NA'</code> if not. However, I'm doing this about 500k times and also retrieving/generating other information about each top-level key from elsewhere, and I'm trying to speed this up a little bit.</p>