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