Sort tuples based on second parameter,my_list.sort(key=lambda x: x[1])