Current List:[['Magneto', 0, 'Insignificantly Evil'], ['Mystique', 0, 'Insignificantly Evil'], ['Mr. Sinister', 2, 'Cautiously Evil']]
I have the code above: I can sort it in order by the 2nd Column of the list, BUT I need HELP with sorting it by the first column if the second Column is the same. So the correct order of the list above is.
This list should be sorted first on the number (highest to lowest) with ties broken by the first column(lexicographical).
Final List:
[
('Mr. Sinister', 2, 'Cautiously Evil'),
('Magneto', 0, 'Insignificantly Evil'),
('Mystique', 0, 'Insignificantly Evil')
])
!Notice how only part of the first column has been sorted alphabetically, as first one is 2 so it get priority!
Please give ideas in anyway shape or form.