title: Return 'similar score' based on two dictionaries' similarity in Python?
body: <p>I know it's possible to return how similar two strings are by using the following function:</p>
  
  <pre><code>from difflib import SequenceMatcher
  def similar(a, b):
      output=SequenceMatcher(None, a, b).ratio()
      return output
  
  In [37]: similar("Hey, this is a test!","Hey, man, this is a test, man.")
  Out[37]: 0.76
  In [38]: similar("This should be one.","This should be one.")
  Out[38]: 1.0
  </code></pre>
  
  <p>But is it possible to score two <em>dictionaries</em> based on the similarity of keys and their corresponding values? Not a number of in common keys, or what <em>is</em> in common, but a score from 0 to 1, like the example above with strings.</p>
  
  <p>I'm trying to find the similarity score between ratings['Shane'] and ratings['Joe'] in this dictionary:</p>
  
  <p><code>ratings={'Shane': {'127 Hours': 3.0, 'Avatar': 4.0, 'Nonstop': 5.0}, 'Joe': {'127 Hours': 5.0, 'Taken 3': 4.0, 'Avatar': 5.0, 'Nonstop': 3.0}}</code></p>
  
  <p>I am using Python 2.7.10</p>