input: Write a python function to sort a list of tuples based on the second element.
  assert sort_tuples([('a', 4), ('b', 3), ('c', 2)]) == [('c', 2), ('b', 3), ('a', 4)]
  assert sort_tuples([('apple', 5), ('banana', 2), ('cherry', 7)]) == [('banana', 2), ('apple', 5), ('cherry', 7)]
  assert sort_tuples([(1, 3), (2, 2), (3, 1)]) == [(3, 1), (2, 2), (1, 3)]
output: def sort_tuples(lst):
      return sorted(lst, key=lambda x: x[1])