I would like to retrieve dictionary keys according to a list of priority keys. The dictionary looks like:
My_dic = {'name': 'John', 'age': '33', 'gender':'male', 'car': 'SUV'}
And the list of criteria is:
My_criteria = ['gender', 'age', 'car', 'name']
How can this be done in a pythonic way?