python dict add two code example Example 1: merge two dict python 3 z = {**x, **y} Example 2: concatenate two dictionnaries python d1.update(d2)