title: How to create a double dictionary in Python?
body: <p>I'd like to create a dictionary inside a dictionary in python using function <code>setdefault()</code>.
  I'm trying to make a list of names and dates of birth using fallow dictionary.</p>
  
  <pre><code>names = {'Will': 'january', 'Mary': 'february', 'George': 'march', 'Steven': 'april', 'Peter': 'may'}
  dates = {'Will': '7/01', 'George': '21/03', 'Steven': '14/03', 'Mary': '2/02'}
  </code></pre>
  
  <p>I was tring to use set to achieve this:</p>
  
  <pre><code>res_dict = dict()
  for v, k in names.items():
      for v1, k1 in dates.items():
          res_dict.setdefault(v, {}).append(k)
          res_dict.setdefault(v1, {}).append(k1)
  return res_dict
  </code></pre>
  
  <p>but it give me an error.</p>
  
  <p>The result should be:</p>
  
  <pre><code>res_dict = {'Will': {'january': '7/01'}, 'Mary' : {'february': '2/02'} ,'George': {'march': '21/03'}, 'Steven': {'april': '14/03'}, 'Peter': {'may': ''}}
  </code></pre>
  
  <p>How can I get the desired result using <code>setdefault()</code>?</p>