def merge_two_dicts(x, y):
z = x.copy() # start with keys and values of x
z.update(y) # modifies z with keys and values of y
return z
x = {'a': 1, 'b': 2}
y = {'b': 3, 'c': 4}
z = merge_two_dicts(x, y)
print(z)