Hi, i need to sort the following list of Tuples in Python:
ListOfTuples = [('10', '2010 Jan 1;', 'Rapoport AM', 'Role of antiepileptic drugs as preventive agents for migraine', '20030417'), ('21', '2009 Nov;', 'Johannessen SI', 'Antiepilepticdrugs in epilepsy and other disorders--a population-based study of prescriptions', '19679449'),...]
My purpose is to order it by Descending year (listOfTuples[2]) and by Ascending Author (listOfTuples[2]):
sorted(result, key = lambda item: (item[1], item[2]))
But it doesn't work. How can i obtain sort stability?