2
Well... I wanted to make a list for possible user responses to input, for example:
nom = str(input('Você gosta de mim? '))
lista = ['sim','claro','obvio']
if nom == lista:
print('obrigado, bom saber')
else:
print('Que pena')
Good... What I wanted is that if the user typed one of the words that are on that list would print the msg "Thank you, good to know"
But since I’m new to python, I don’t even know if it’s right to do so with the list, when I put one of the words that are on the list appeared the other msg "what a pity"
I wanted you to help me if it has how to do so with a list or has to be doing the possible answers in if even without the list
if nom in lista:
– Paulo Marques
Vlw man, you helped me a lot
– P. Azap
here
nom = str(input('Você gosta de mim? '))
don’t need to usestr()
forinput()
returns string.– Augusto Vasques