-1
I made this code, but it does not enter the option informed by the user (I think the option already tells what he has to do).
lista = []
while True:
print("Adicionar nome - 1")
print("Sair - 0")
print("Listar - 2")
op = input()
if op == 0:
break
elif op == 1:
nome = input("Digite o nome")
lista.append(nome)
elif op == 2:
j = 0
for nomes in lista:
print(nomes)
Set the input type for the input. This will solve your problem: op = int(input())
– Netinho Santos