Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created August 22, 2018 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/ec2729e1ceb1bee8e2ad9257dc600837 to your computer and use it in GitHub Desktop.
Save Fhernd/ec2729e1ceb1bee8e2ad9257dc600837 to your computer and use it in GitHub Desktop.
Uso de funciones anónimas. Python. OrtizOL.
sumar = lambda x, y: x + y
print(sumar(2, 3))
print(sumar(5, 2))
nombres = ['Edward Ortiz', 'Jaela Meneses',
'Juan Urbano', 'Oliva Ordoñez']
print(sorted(nombres, key=lambda nombre: nombre.split()[-1].lower()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment