title: How do I concatenate 2 dictionaries which have the same keys, while retaining all the values?
body: <p>Let's say I have</p>
  <p><code>d1 = { k1:v1, k2:v2, k3:v3}</code></p>
  <p>and</p>
  <p><code>d2 = { k1:v4, k2:v5, k3:v6}</code></p>
  <p>How can I merge these two dictionaries in such a way that</p>
  <p><code>d = { k1:v1, k2:v2, k3:v3, k4:v4, k5:v5, k6:v6}</code>?</p>
  <p>Currently I'm using this piece of code which is brute force and not that efficient when it comes to larger dictionaries:</p>
  <pre><code>d = {}
  d1 = { '1':v1, '2':v2, '3':v3}
  d2 = { '1':v4, '2':v5, '3':v6}
  
  i = len(d1)
  for k in d2.keys():
      d[str(i)] = d2[k]
      i += 1
  </code></pre>
  <p>I am an amateur when it comes to coding so can someone please help me out?</p>