title: Reverse multiple values with keys in dictionary
body: <p>I'm quite new to Python and overall programming so bear with me.</p>
  
  <p>What I have is a dictionary of <code>['Male', 'Female', 'Eunuch']</code> as values and different names for these as keys:</p>
  
  <p><code>Persons = { 'Hodor' : 'Male', 'Tyrion': 'Male', 'Theon': 'Male', 'Arya': 'Female', 'Daenerys': 'Female', 'Sansa': 'Female', 'Varys': 'Eunuch}</code></p>
  
  <p>I want to order them into <code>{ Gender: {Names: Counts}}</code></p>
  
  <p>As such:</p>
  
  <p>input:
  <code>lst = ['Hodor', 'Hodor', 'Tyrion', 'Tyrion', 'Tyrion', 'Arya', 'Daenerys', 'Daenerys', 'Varys']</code></p>
  
  <p>output:
  <code>{'Male': {'Hodor': 2, 'Tyrion': 3, Theon: 0}, 'Female': {'Arya': 1, 'Daenerys': 2, 'Sansa': 0}, 'Eunuch': {'Varys': 1}}</code></p>
  
  <p>The first thing I have tried is making a code for counting:</p>
  
  <pre><code>counts = {}
  for key in Persons: 
      counts[key] = 0 
  
  for key in lst:
      counts[key] += 1
  </code></pre>
  
  <p>My dictionary D now contains the counts, but how do I compute them all together?</p>
  
  <p><code>Names = Persons.keys()</code>
  <code>Gender = Persons.values()</code>
  <code>Counts = counts.values()</code>
  <code>Names = counts.keys()</code></p>
  
  <p>If varys isn't mentioned the gender 'Eunuch' shouldn't be in the output.
  I've tried different things, but when I try to connect them. I try to switch keys with values, but then only one name comes up.</p>
  
  <p>Hope it makes sense of what I want to do :)</p>
  
  <p>Edit:  If Sansa isn't mention and other females are her value should be 0. And I want to be able to manipulate the numbers. Say at what percentage is Hodor mentioned compared to all the males.</p>