title: compare two dictionaries in python
body: <p>How do i campare dictionaries that contain dictionaries ? </p>
  
  <p>This will work in case the dictionaries contain simple values    </p>
  
  <pre><code># will show the keys with different values
  
  d1_keys = set(dict1.keys())
  d2_keys = set(dict2.keys())
  intersect_keys = d1_keys.intersection(d2_keys)
  modified = {}
  for i in intersect_keys:
       if dict1[i] != dict2[i] : modified.update({i : (dict1[i], dict2[i])})
  </code></pre>
  
  <p>but i have a dictionary like this:</p>
  
  <pre><code>{ 'medic1' : {'date' : '02/02/2015', 'no' : '123' }, 'medic2' : {'date' :'02/03/2015', 'no' : '456' }}
  </code></pre>