input: Write a python function to sort a list of tuples based on the second element of each tuple.
  assert sort_list([(1, 3), (2, 2), (3, 1)]) == [(3, 1), (2, 2), (1, 3)]
  assert sort_list([(10, 5), (20, 3), (30, 4)]) == [(20, 3), (30, 4), (10, 5)]
  assert sort_list([(5, 7), (2, 6), (3, 9), (8, 1)]) == [(8, 1), (2, 6), (5, 7), (3, 9)]
output: def sort_list(tuples):
      return sorted(tuples, key=lambda x: x[1])