how to concatenate two dictionaries to create a new one in Python?

Say I have three dicts

d1={1:2,3:4}
d2={5:6,7:9}
d3={10:8,13:22}

How do I create a new d4 that combines these three dictionaries? i.e.:

d4={1:2,3:4,5:6,7:9,10:8,13:22}

Leave a Comment