Skip to content

Instantly share code, notes, and snippets.

@vitalbh
Created January 17, 2012 00:10
Show Gist options
  • Save vitalbh/1623741 to your computer and use it in GitHub Desktop.
Save vitalbh/1623741 to your computer and use it in GitHub Desktop.
Ordenando uma lista de objetos por um atributo do objeto
list = list(lista1) + list(lista2)
list.sort(key=lambda x: x.atributo) #funcao anonima
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment