title: Python create nested dictionary from list with nested tuples
body: <p>Thank you for your help. Still very new to python. I trust I'm not abusing the goodwill of SO with such questions. I am trying to evolve from SQL database mentality to a python lists/dictionary approach.</p>
  
  <p>Here is a snippet of a list with nested tuples (always containing three elements): </p>
  
  <pre><code>List = [(u'32021', u'161', 1696.2), (u'32021', u'162', 452.2), (u'32044', u'148', 599.2), (u'32044', u'149', 212.2)]
  </code></pre>
  
  <p>Can this be converted to a dictionary with nested dictionaries, something like this: </p>
  
  <pre><code>{'32021': ('161': 1696.2, '162': 452.2), '32044': ('148': 599.2, '149': 212.2)}
  </code></pre>
  
  <p>I addressed a similar problem that only had two items in each tuple using:</p>
  
  <pre><code>d = defaultdict(list)
  for k, v in values:
      d[k].append(v)
  </code></pre>
  
  <p>For three items, is one solution using indexing with a for loop? </p>
  
  <p>Thank you.</p>