-1

I have the following list:

[(41, '', 'Javier', 'Lopez', '1.2', ''), (42, '', 'jucas3', 'Af', '1.3', ''), (43, '', 'Juinoa', 'Afghu', '1.1', '')]

As you can see, this list contains 3 tuples inside, sorted by a first element (41, 42, 43). I want to reorder this list by what would be the penultimate element, so that the list would be like this:

[(43, '', 'Juinoa', 'Afghu', '**1.1**', ''), (41, '', 'Javier', 'Lopez', '**1.2**', ''), (42, '', 'jucas3', 'Af', '**1.3**', '')]
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Mathese
  • 7
  • 1

0 Answers0