input: Write a python function to sort a list of tuples based on the second element, and if they are the same, sort by the first element.
  assert sort_tuples([(1, 3), (2, 3), (3, 1), (2, 2)])==[(3, 1), (2, 2), (1, 3), (2, 3)]
  assert sort_tuples([(5, 4), (2, 4), (3, 2), (1, 2)])==[(3, 2), (1, 2), (2, 4), (5, 4)]
  assert sort_tuples([(0, 0), (1, 1), (2, 1), (3, 3)])==[(0, 0), (1, 1), (2, 1), (3, 3)]
output: def sort_tuples(lst):
      return sorted(lst, key=lambda x: (x[1], x[0]))