title: Create and lookup 2D dictionary with multiple keys per value
body: <p>I think I want to make a 2D dictionary with multiple keys per value.</p>
  
  <p>I know how to make a 2D dictionary using <code>defaultdict</code>:</p>
  
  <pre><code>from collections import defaultdict
  2d_dict = defaultdict(dict)
  
  2d_dict['canned_food']['spam'] = 'delicious'
  </code></pre>
  
  <p>And I know that using regular dictionaries you can make with multiple keys like:</p>
  
  <pre><code>dictionary={('food','canned_food'):spam}
  </code></pre>
  
  <p>But I want to do something like lookup by tuple-of-keys:</p>
  
  <pre><code>2d_dict[('canned_food','food')]['spam'] = 'delicious'
  </code></pre>
  
  <p>In the first dimension of dictionary I need ~25 keys per value. Is there a way to do this with <code>defaultdict</code>?</p>
  
  <p>Even if there is a way to do it with dicts is this a reasonable way to make a simple multidimensional lookup table? </p>