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