title: store multiple values for one key in dictionary
body: <p>I have a list of data, which has 2 values:</p>
  
  <pre><code>a    12
  a    11
  a    5
  a    12
  a    11
  </code></pre>
  
  <p>I would like to use a dictionary, so I can end up with a list of values for each of the key. Column 1 may have a different entry, like <code>'b'</code>, so I can arrange data based on column 1 as key, while column 2 is the data for each key </p>
  
  <pre><code>[a:12,11,5]
  </code></pre>
  
  <p>How do I achieve this? From what I read, if 2 values has the same key, the last one override the previous one, so only one key is in the dictionary.</p>
  
  <pre><code>d={}
  for line in results:
      templist=line.split(' ')
      thekey=templist[0]  
      thevalue=templist[1]
  
      if thevalue in d:
          d[thekey].append(thevalue)
      else:
          d[thekey]=[thevalue]
  </code></pre>
  
  <p>Am I approaching the problem using the wrong way?</p>