title: Dictionary within dictionary in Python 3
body: <p>I'm seeking to make a function <code>addproperty(property_str, property_dict, old_dict = None)</code> where I you need as arguments a string, one dictionary and one optional dictionary.
  The function needs to return a new dictionary where the corresponding values are added to the optional dictionary.</p>
  
  <p>For instance. If I enter:</p>
  
  <pre><code>capitals_dict = {'USA': 'Washington', 'Russia': 'Moscow', 'Japan': 'Tokyo'}
  </code></pre>
  
  <p>The function <code>addproperty('capital', capitals_dict)</code> needs to return the following dictionary</p>
  
  <pre><code>{'USA': {'capital': 'Washington'}, 'Russia': {'capital': 'Moscow'}, 'Japan': {'capital': 'Tokyo'}}
  </code></pre>
  
  <p>I also need to be able to expand such dictionary to add new details to those countries when I enter that dictionary in the optional parameter.</p>
  
  <p>For instance:</p>
  
  <pre><code>old_dict = {'USA': {'capital': 'Washington'}, 'Russia': {'capital': 'Moscow'}, 'Japan': 'capital': 'Tokyo'}}
  demonym_dict = {'USA': 'American', 'Russia': 'Russian', 'Japan': 'Japanese'}
  </code></pre>
  
  <p>Then <code>addproperty('demonym', demonym_dict, old_dict)</code> needs to return:</p>
  
  <pre><code>{'USA': {'capital': 'Washington', 'demonym': 'American'}, 'Russia': {'capital': 'Moscow', 'demonym': 'Russian'}, 'Japan': {'capital': 'Tokyo', 'demonym': 'Japanese'}}
  </code></pre>
  
  <p>How should I start here?</p>