How to check if user input contains one word from a list of possible words

I am doing a text adventure and I want to check if the user enters something that contains one keyword from the list of possible words, and if it contains more, this is an error message. any

checks if there are any items that are true and all

checks if they are all true. How can I check if only one character is returning true? Is there an if statement I could add to any

?

+3


source to share





All Articles