title: Get Duplicate values when creating a dictionary with list comprehension in Python
body: <p>I have two lists as follows:</p>
  
  <pre><code>list1 = [0, 0, 1]
  list2 = [0, 1, 2]
  </code></pre>
  
  <p>I zip them using: </p>
  
  <pre><code>zipped_list = zip(list1,list2)
  </code></pre>
  
  <p>The result is <code>zipped_list = [(0, 0), (0, 1), (1, 2)]</code>
  Now, I want to create a dictionary using list comprehension as follows:</p>
  
  <pre><code>d = {k:v for k, v in zipped_list}
  </code></pre>
  
  <p>The result is <code>d={0: 1, 1: 2}</code></p>
  
  <p>That is for the <code>key = 0</code> in <code>zipped_list</code>, the dictionary contains only the last occurrence of key, value pair.</p>
  
  <p>The question is: how can I get all occurrences of key, value pairs for duplicate keys and not only the last one?</p>
  
  <p>In the particular example, I would like to get </p>
  
  <pre><code>d={0: 0, 0: 1, 1: 2}
  </code></pre>