title: Taking a list of tuples as an argument and returning a dictionary as a result
body: <p>If I have a list of tuples like so.</p>
  
  <p><code>friendface = [('zeus','apollo'),('zeus','aphrodite'), ('apollo','aphrodite'), ('athena','hera'), ('hera','aphrodite'), ('aphrodite','apollo'), ('aphrodite','zeus'), ('athena','aphrodite'), ('aphrodite','athena'), ('zeus','athena'), ('zeus','hera')</code></p>
  
  <p>I want to write a function called <strong>likes_relation(friendface)</strong> which return a dictionary which shows who each person is linked with, the solution should look something like this.. </p>
  
  <pre><code>&gt;&gt;&gt; likes_relation(friendface)
  
  {'Aphrodite': ['Apollo', 'Zeus', 'Athena'],
  'Hera': ['Aphrodite'],
  'Zeus': ['Apollo', 'Aphrodite', 'Athena', 'Hera'],
  'Apollo': ['Aphrodite'],
  'Athena': ['Hera', 'Aphrodite'] }
  </code></pre>
  
  <p>If someone knows how this can be done I'd appreciate the help as it's really starting to annoy me now.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT : I've currently got a bit of terrible code. </p>
  
  <pre><code>def likes_relation(friendface):
      dict_friends = dict(friendface)
      for name in friendface:
          if name not in dict(friendface):        
              #dict(friendface)[name[:] = name[1]
    #What i'm trying to do is go and run through the list
    # again and if one of the sets isn't in the dictionary
    # then add it.... obviously i don't know how...
  </code></pre>
  
  <p>return dict(friendface)</p>