![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
17/06/2009, 09:53
|
![Avatar de razpeitia](http://static.forosdelweb.com/customavatars/avatar93893_5.gif) | Moderador | | Fecha de Ingreso: marzo-2005 Ubicación: Monterrey, México
Mensajes: 7.321
Antigüedad: 19 años, 10 meses Puntos: 1360 | |
Respuesta: ordenar una lista por una propiedad de los elemntos
Código python:
Ver originall = [['01','A','Z',2], ['01','B','X',1], ['02','C','Z',1], ['03','D','Y',2]] l.sort(reverse=True, key=lambda x:(x[-1])) print l
|