How can I print a dictionary as a union of given dictionaries & appending the values if the keys are equal?
Input:
dict_1 = {
"x":[1,"hello"],
"y":[2,"world"],
"z":3
}
dict_2 ={
"p":4,
"q":19,
"z":123
}
Output:
dict_3={"x":[1,"hello"],
"y":[2,"world"],
"z":[3,123],
"p":4,
"q":19,
}