title: How do I pair the output from a dictionary to print the values with same key?
body: <p>I am trying to pair the values from the output. I am trying to pair the values to the same key.
  The code is</p>
  <pre><code>    key = input(&quot;parent_id:&quot;)
      value = input(&quot;child_id:&quot;)
      myList[key] = [value]
      myList
  </code></pre>
  <p>The output is</p>
  <pre><code>    myList = [{'parent_id' : 123, 'child_id' : 987},
      {'parent_id' : 234, 'child_id' : 876},
      {'parent_id' : 123, 'child_id' : 765},
      {'parent_id' : 345, 'child_id' : 654},
      {'parent_id' : 345, 'child_id' : 543}]
  </code></pre>
  <p>I want the output to be:</p>
  <pre><code>{ 123 : [987, 765],
   234 : [876],
   345 : [654, 543] }
  </code></pre>
  <p>How do i go about it?</p>