title: nested dictionaries or tuples for key?
body: <p>Suppose there is a structure like this:</p>
  
  <pre><code>{'key1' : { 'key2' : { .... { 'keyn' : 'value' } ... } } }
  </code></pre>
  
  <p>Using python, I'm trying to determine advantages/disadvantages of two different approaches:</p>
  
  <pre><code>{'key1' : { 'key2' : { .... { 'keyn' : 'value' } ... } } } # A. nested dictionary
  {('key1', 'key2', ...., 'keyn') : 'value'} # B. a dictionary with a tuple used like key
  </code></pre>
  
  <p>Then I'm interested to know, what is the best (A or B) in terms of:</p>
  
  <ul>
  <li>Memory occupation</li>
  <li>Complexity in insertion (considering collision-avoiding alorithms, etc...)</li>
  <li>Complexity in find</li>
  </ul>