Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- #lista de paises
- paises = ["Argentina", "Brasil", "Chile", "Uruguay"]
- #actualizo tercer elemento
- paises[2] = "Perú"
- #Agrego un pais
- # a continuacion se concatenan dos listas
- output = paises + ["Paraguay", "Ecuador"]
- # Unimos 3 listas
- output2 = [ "mexico", "honduras"] + paises + ["Paraguay", "Ecuador"]
- #imprime
- print(output)
- print(output2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement