Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 19, 2018 04:34
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 parzibyte/8a549f9602bcb54bec1a4d1891b4b55d to your computer and use it in GitHub Desktop.
Save parzibyte/8a549f9602bcb54bec1a4d1891b4b55d to your computer and use it in GitHub Desktop.
Invertir lista y asignar resultado a otra created by parzibyte - https://repl.it/@parzibyte/Invertir-lista-y-asignar-resultado-a-otra
"""
Invertir lista o arreglo en Python, pero asignar
el resultado a otra lista
@author parzibyte
"""
lenguajes = ["Go", "Rust", "C", "JavaScript", "PHP"]
print("La lista es: ", lenguajes)
lenguajes_invertidos = lenguajes[::-1]
print("Lenguajes invertidos son:", lenguajes_invertidos)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment