keysList = ['x2', 'x1', 'y1', 'y2']
z = {}
for key, value in dict(list(x.items()) + list(y.items())).items():
    if key in keysList:
        z.update({key: value})
print(z)
How to construct a dictionary from two dictionaries in python?