title: Removing duplicate keys from python dictionary but concatenating the values of duplicated keys
body: <p>Let's say I have two lists:</p>
  
  <pre><code>lista = ['winter', 'fall', 'spring', 'summer', 'winter', 'spring']
  listb = ['cold', 'rainy', 'windy', 'hot', 'chilly', 'wet']
  </code></pre>
  
  <p>I want to create a dictionary that pulls the unique values from lista as the key (which it will do automatically since dictionaries can only have unique keys) and the values from list b as the dictionary value, corresponding to lista by their order. So to create the dictionary I would do:</p>
  
  <pre><code>mydict = {k: v for k, v in zip(lista, listb)}
  </code></pre>
  
  <p>If I print this, I get:</p>
  
  <pre><code>{'winter': 'chilly', 'fall': 'rainy', 'spring': 'wet', 'summer': 'hot'}
  </code></pre>
  
  <p>However, what I would like to do, is for every "key" from lista that is duplicate, I'd like to concatenate the values from listb to be the "value" in the dictionary as a list. So the goal would be:</p>
  
  <pre><code>{'winter': ['cold', 'chilly'], 'fall': ['rainy'], 'spring': ['windy', 'wet'], 'summer': ['hot']}
  </code></pre>
  
  <p>This is a dumbed down version of what I am trying to do but I think it applies - I am reading a csv file and trying to make the "last name" column the key, and every other row the value (as a list). So far I've created a list for last names and the list for the other rows, but I need to concatenate the values for duplicate names.</p>