title: Retrieve the unique keys (second dimension) of a 2 dimensional dictionary in python?
body: <p>I have a a 2d dictionary (named d2_dic). I know how to get the unique keys (It's always unique) of the first dimension by d2_dic.keys(). But how do I get the unique keys of the second dimension?</p>
  
  <pre><code>from collections import defaultdict
  d2_dic = defaultdict(dict)
  d2_dic['1']['a'] = 'Hi'
  d2_dic['1']['b'] = 'there'
  d2_dic['2']['a'] = '.'
  </code></pre>
  
  <p>To get the unique keys in the first dimension, i just need to do a d2_dic.keys() {o/p = 1,2}
  How do I retrieve the unique keys of the second dimension??</p>
  
  <p>I need an o/p of [a,b]</p>