Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- # Script que imprime una lista de nombres verticalmente
- lista = ["Juana", "Ana", "Abel", "Luis", "María"]
- i = 0
- while i < len(lista):
- print(lista[i])
- i = i + 1
- # SPOILER: en los ciclos DEFINIDOS USAR for
- for nombre in lista:
- print(nombre)
Advertisement
Add Comment
Please, Sign In to add comment