I am working on a text-based game, and want the program to search for multiple specific words in order in the user's answer. For example, I wan't to find the words "Take" and "item" in a user's response without making the user type specifically "Take item".
I know that you can use
if this in that
to check if this word is in that string, but what about multiple words with fluff in between?
The code I am using now is
if ("word1" and "word2" and "word3) in ans:
but this is lengthy and won't work for every single input in a text-based game. What else works?