Skip to main content

Search Engine

· One min read
Kaustubh Kulkarni

You're working on a search engine. Watch your back Google!
The given code takes a text and a word as input and passes them to a function called search().
The search() function should return "Word found" if the word is present in the text, or "Word not found", if it's not.
Sample input
"This is awesome"
Sample Output
Word found


text = input()
word = input()
def search(text,word):
if(word in text):
return "Word found"
return "Word not found"
print(search(text, word))