It's an simple python program for to search the word is present in the String or not.Here we are using an if condition to check the word is present in the sentence are not.
Sentence = "The window is red and the door is blue!" word = "blue" if word in Sentence: print 'Present' else: print 'Not Present'
Present
Comments :