input: Write a function to sort a dictionary by its keys and print the key-value pairs.
  assert sort_dict_by_keys({'a': 5, 'c': 10, 'b': 4}) == [('a', 5), ('b', 4), ('c', 10)]
  assert sort_dict_by_keys({'banana': 3, 'apple': 4, 'pear': 1}) == [('apple', 4), ('banana', 3), ('pear', 1)]
  assert sort_dict_by_keys({'z': 1, 'y': 2, 'x': 3}) == [('x', 3), ('y', 2), ('z', 1)]
output: def sort_dict_by_keys(d):
      return sorted(d.items())