Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created January 14, 2018 13:54
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/05679cedf1645675a505dc779f0d62e7 to your computer and use it in GitHub Desktop.
Save Fhernd/05679cedf1645675a505dc779f0d62e7 to your computer and use it in GitHub Desktop.
Invertir una cadena de caracteres (string) en Python.
escritor = 'Fyodor Mikhailovich Dostoevsky'
cadenaInvertida = escritor[::-1]
print(cadenaInvertida)
@GintokiYT
Copy link

Thanks men

@nor84
Copy link

nor84 commented Apr 30, 2024

es mucho mas sencillo que usar un bucle

@Fhernd
Copy link
Author

Fhernd commented May 1, 2024

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