22 lines
410 B
Python
22 lines
410 B
Python
"""
|
|
Escribe un programa que añade valores a una lista mientras su
|
|
longitud sea menor que 10 y mostrar la lista
|
|
usar while y for
|
|
|
|
"""
|
|
"""
|
|
lista = []
|
|
|
|
for indice in range(1,11):
|
|
valor= input("ingrese un valor")
|
|
lista.append(valor)
|
|
print(lista)
|
|
"""
|
|
lista_con_while = []
|
|
|
|
while len(lista_con_while) < 10:
|
|
valor= input("ingrese un valor")
|
|
lista_con_while.append(valor)
|
|
|
|
print(len(lista_con_while))
|