b = word in chain(islice(wordList, None, 1), islice(wordList, 2, None))
from itertools import chain
words = frozenset(chain(wordList[:1], wordList[2:]))
b = word in words
python check if word is in certain elements of a list