let\'s suppose that I have this list.
A=[(a,1), (b,3), (d,2), (c,2)]
I wanna sort it based on 2 things, first I check the numbers, if they ar