- 1
Python code
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.
3 Answers
+ 1
def search(t,w):
for i in t:
If i == t:
print(âword foundâ)
else:
print(ânot foundâ)
text = input()
Word = input().split()
#python