How can I efficiently and easily sort a list of tuples without being sensitive to case?
For example this:
[('a', 'c'), ('A', 'b'), ('a', 'a'), ('a', 5)]
Should look like this once sorted:
[('a', 5), ('a', 'a'), ('A', 'b'), ('a', 'c')]
The regular lexicographic sort will put 'A' before 'a' and yield this:
[('A', 'b'), ('a', 5), ('a', 'a'), ('a', 'c')]