input: Write a function to sort a dictionary by its keys.
  assert sort_dict_by_key({'John': 23, 'Alice': 27, 'Bob': 17, 'Eve': 33})==[17, 23, 27, 33]
  assert sort_dict_by_key({'banana': 3, 'apple': 4, 'pear': 1, 'orange': 2})==[4, 3, 2, 1]
  assert sort_dict_by_key({'d': 4, 'a': 1, 'c': 3, 'b': 2})==[1, 2, 3, 4]
output: def sort_dict_by_key(d):
      return [d[key] for key in sorted(d.keys())]