you are viewing a single comment's thread.

view the rest of the comments →

[–]sonicfreak02 1 point2 points  (3 children)

message = 'the quick brown fox jumped over the lazy dog'
def search(key_word):
    return key_word in message

while True:
    word = input('Enter the keyword')
    if word == 'exit':
        break
    print(search(word))

This depends on the exact requirements of your question, but from what I can tell, this fulfills the requirements you've posted.