I have a list which I want to sort based on ('a','b','c') first and then based on (1,2,3)
How do i do these using itemgetter() since the list is nested A=[('k3', ['b', 3]), ('k2', ['a', 1]), ('k1', ['a', 3]), ('k4', ['c', 2])] The solution I am looking for is A_sorted=[ ('k2', ['a', 1]), ('k1', ['a', 3]), ('k3', ['b', 3]) ('k4', ['c', 2])] Please suggest Regards, ranjan --
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor