0
The output should be Word found or word not found but it is also producing "None" after every output . What's the error??
def search(text,word): if word in text: print("Word found") else : print("Word not found") text = input() word = input() print(search(text, word))
3 Answers
+ 2
Also, no need to print the search function again, you have already printed within the function itself
https://code.sololearn.com/cGZQn6oUKOcu/?ref=app
+ 2
Thanks....it works
+ 1
try
text = input().split(' ');