0
What's wrong with my search engine code?
text = input() word = input() def search(text, word): if word in text: return ("word found") else: return ("word not found") print(search(text, word)) When I run the output is the same but it says it's wrong. Where's the problem ?
3 odpowiedzi
+ 5
Check the string which you have printed
0
it looks fine, Joni and after checking it, it also works well !
let me give you a piece of advice...
you better use the input like this....
text=input ("enter the text here, please: ")
word=input ("and enter the word here: ")
and don't put a lot of new lines between the function "def..." and the next line
that will probably help...
good luck, and peace