+ 3
Python for Beginners - Search Engine Project
Im gettting the correct output for each test case, but there is a second output that says none in each one, im guessing its because of the second argument in the defined function, but i dont know how to fix it, any help would be appreciated. def search(text, word): if word in text: print('Word found') else: print('Word not found') text = input() word = input() print(search(text, word))
4 odpowiedzi
+ 2
MrPringle48
Don't print function if you have already printed value in that function because function returns None if you don't use return to return anything.
So just call function.
+ 1
In your last line only write search(text, word)
- 2
What
- 2
https://code.sololearn.com/WvGU05zPBjA0/?ref=app
https://code.sololearn.com/c9Z0Uetuua8q/?ref=app
https://code.sololearn.com/Wq4iRKC1TVM1/?ref=app
https://code.sololearn.com/Wtpi12CCZXp8/?ref=app
https://code.sololearn.com/WuLYj21FgL7Q/?ref=app
https://code.sololearn.com/W7BYs77meQKz/?ref=app
https://code.sololearn.com/WHRK8UgyJys3/?ref=app