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