The easiest way to do this is probably the following:
words = set('blue yellow'.split())
if 'blue' in words:
print 'yes'
else:
print 'no'
If your words list is really huge, you'll get a speed increase by wrapping words.split() in set as testing set membership is more computationally efficient than testing list membership.