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