Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJosé Manuel Martínez López
18,133 PointsIs my solution good?
stuff = []
while True:
print("\n*** Menu ***")
print("\n1.-Consultar")
print("2.-Llenar")
print("3.-Salir")
try:
enter = int(input("Seleccione una opción: "))
except:
print("Selecciona una opción valida")
else:
if enter == 1:
if not stuff:
print("Su lista esta vacia")
else:
for data in stuff:
print("\n" + data)
elif enter == 2:
while True:
new = input("Ingrese su pendiente: ")
stuff.append(new)
print("\n¿Desea seguir llenando su lista?")
print("1.-Si")
print("2.-No")
try:
enter = int(input("Seleccione una opción: "))
except:
print("Seleccione una opción valida")
else:
if enter == 1:
continue
elif enter == 2:
break
elif enter == 3:
break
[MOD: added ```python markdown formating -cf]
1 Answer
Alexander Davison
65,469 PointsYou did a very good job Sorry for late response anyway. Keep it up!!