For example, you want to merge dictionaries x and y. There are different ways to merge them. Check them out !
1. Python 2, or lower than Python 3.4 you can use a custom function as provided below :
def merge_dicts(x, y):
z = x.copy()
z.update(y)
return z
then, called it by :
z = merge_dicts(x, y)
2. For Python 3.5 or greater user :
z = {**x, **y}
3. For Python 3.9.0 or greater :
z = x | y