Created
August 22, 2018 16:57
-
-
Save Fhernd/ec2729e1ceb1bee8e2ad9257dc600837 to your computer and use it in GitHub Desktop.
Uso de funciones anónimas. Python. OrtizOL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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