Created
January 14, 2018 13:54
-
-
Save Fhernd/05679cedf1645675a505dc779f0d62e7 to your computer and use it in GitHub Desktop.
Invertir una cadena de caracteres (string) en Python.
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
escritor = 'Fyodor Mikhailovich Dostoevsky' | |
cadenaInvertida = escritor[::-1] | |
print(cadenaInvertida) |
es mucho mas sencillo que usar un bucle
Es supremamente práctico.
Es una de las ventajas que tiene este lenguaje de programación.
Por otra parte, te recomiendo mi canal en YouTube.
Saludo.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks men