input: Write a function to sort a list of tuples by the second element in each tuple.
  assert sort_tuples([(5, 4), (1, 5), (7, 3), (2, 8), (6, 2)]) == [(6, 2), (7, 3), (5, 4), (1, 5), (2, 8)]
  assert sort_tuples([(10, 3), (5, 2), (8, 1), (6, 6)]) == [(8, 1), (5, 2), (10, 3), (6, 6)]
  assert sort_tuples([(3, 3), (2, 2), (1, 1)]) == [(1, 1), (2, 2), (3, 3)]
output: def sort_tuples(lst):
      return sorted(lst, key=lambda x: x[1])