I have the following List with a List of tuples:
[[('Armin', 1.0), ('Doris', 0.2240092377397959)], [('Benjamin', 1.0), ('Doris', 0.3090169943749474)], [('Caroline', 1.0), ('Benjamin', 0.2612038749637414)], [('Doris', 1.0), ('Benjamin', 0.3090169943749474)], [('Ernst', 1.0), ('Benjamin', 0.28989794855663564)]]
This is a list of tuples in a list. I would like to sort it by the value of the second tuple in each list. For instance - I would like to have this result of my orderedList:
[[('Benjamin', 1.0), ('Doris', 0.3090169943749474)],[('Doris', 1.0), ('Benjamin', 0.3090169943749474)],[('Ernst', 1.0), ('Benjamin', 0.28989794855663564)],[('Caroline', 1.0), ('Benjamin', 0.2612038749637414)],[('Armin', 1.0), ('Doris', 0.2240092377397959)]]
I was not able to manage it with sorted and lambda.
Could you please tell me how to do it?