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))

28th Mar 2022, 9:11 AM
Anjali Sharma
Anjali Sharma - avatar
3 odpowiedzi
+ 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
28th Mar 2022, 9:16 AM
Abhishek Tandon
Abhishek Tandon - avatar
+ 2
Thanks....it works
28th Mar 2022, 9:20 AM
Anjali Sharma
Anjali Sharma - avatar
+ 1
try text = input().split(' ');
28th Mar 2022, 9:13 AM
Abhishek Tandon
Abhishek Tandon - avatar