let's say I have the following list in python
[ [1,"C"], [2, "D"], [3,"a"], [4,"b"] ]
I would like to sort the list by the letters so it would be
[ [3,"a"], [4,"b"], [1,"C"], [2, "D"] ]
To sort by the inner character, I would do sorted(unsortedlist, key=itemgetter(1))
.
To sort by ignoring case, I would do sorted(unsortedlist, key=str.lower)
.
How do I sort by an inner element AND ignoring case at the same time?