input: Write a python function to sort a list of tuples by their second elements.
  assert sortBySecondElement([(1, 3), (3, 2), (4, 1), (2, 4)]) == [(4, 1), (3, 2), (1, 3), (2, 4)]
  assert sortBySecondElement([(2, 5), (1, 2), (3, 4), (5, 1)]) == [(5, 1), (1, 2), (3, 4), (2, 5)]
  assert sortBySecondElement([(1, 1), (2, 2), (3, 3), (4, 4)]) == [(1, 1), (2, 2), (3, 3), (4, 4)]
output: def sortBySecondElement(lst):
      return sorted(lst, key=lambda x: x[1])