title: Convert a list of tuples into a dictionary of lists
body: <p>I have the following list: </p>
  
  <pre><code>mydata =[(22, 1),
           (22, 0),
           (22, 0),
           (22, 1),
           (23, 0),
           (23, 1),
           (23, 2),
           (23, 1),
           (23, 0),
           (24, 3),
           (24, 3),
           (24, 2),
           (24, 1),
           (24, 0)]
  </code></pre>
  
  <p>And I want to create a dictionary of lists based on the first items in the tuples. Something like:</p>
  
  <pre><code>mydict = {22: [1, 0, 0, 0], 23: [0, 1, 2, 1, 0], 24: [3, 3, 2, 1, 0]}  
  </code></pre>