master_node = { '1': ['a', 'd'], '2': ['a', 'd'], '4': ['a', 'd']} agent_dict = { '2': ['b', 'f'], '3': ['b', 'f'], '4': ['b', 'f'], } agent_dict = {**master_node, **agent_dict } print(agent_dict)