So let's assume that we have this list:
data=[[A, 5, 200], [B, 5, 220], [C, 4, 150], [D, 4, 150], [E, 1, 50]]
and we want to sort it with the first number (increasing order) and in case of a tie, the second number (decreasing order), and in case of a tie again, in alphabetical order. I tried this code but it just didn't work:
data = sorted(data, key = operator.itemgetter(1, 2))
Is there a better way of doing this ?