I have the following list of tuples:
[("a",6),("b",1),("c",2),("d",4),("e",1),("f",1),("g",5),("h",3),("i",1),("j",2)]
but would like to order tuples in the list with the snd element of the tuple. This way I get a response similar to:
[("b",1),("e",1),("f",1),("i",1),("c",2),("j",2),("h",3),("d",4),("g",5),("a",6)]
(i.e. the list is ordered by the second ( snd ) of each tuple.