Suppose I have a list of lists.
List1=[["Red is my favorite color."],["Blue is her favorite."], ["She is really nice."]]
Now I want to check if the word 'is' exists after a certain set of words.
I made a word lise
word_list=['Red', 'Blue']
Is there a way to check that using if statement?
If I write
if 'is' in sentences:
It will return all three sentences in List1, I want it to return first two sentences.
Is there a way to check if the word 'is' is positioned exactly after the words in word_list? Thank you in advance.