input: Write a python function to sort a list of lists by the second element of each sublist.
  assert sort_by_second_element([['B', 'b'], ['A', 'a'], ['C', 'c']])==[['A', 'a'], ['B', 'b'], ['C', 'c']]
  assert sort_by_second_element([[1, 3], [2, 2], [3, 1]])==[[3, 1], [2, 2], [1, 3]]
  assert sort_by_second_element([[5, 10], [1, 3], [2, 7]])==[[1, 3], [2, 7], [5, 10]]
output: def sort_by_second_element(lst):
      return sorted(lst, key=lambda x: x[1])