title: Dictionary of dictionaries in Python?
body: <p>From another function, I have tuples like this <code>('falseName', 'realName', positionOfMistake)</code>, eg. <code>('Milter', 'Miller', 4)</code>.
  I need to write a function that make a dictionary like this:</p>
  
  <pre><code>D={realName:{falseName:[positionOfMistake], falseName:[positionOfMistake]...}, 
     realName:{falseName:[positionOfMistake]...}...}
  </code></pre>
  
  <p>The function has to take a dictionary and a tuple like above, as arguments.</p>
  
  <p>I was thinking something like this for a start:</p>
  
  <pre><code>def addToNameDictionary(d, tup):
      dictionary={}
      tup=previousFunction(string)
      for element in tup:
          if not dictionary.has_key(element[1]):
              dictionary.append(element[1])
      elif:
          if ...
  </code></pre>
  
  <p>But it is not working and I am kind of stucked here.</p>