0

Point out my mistake..

x = input () y = input () x = x. split (" ") y = y. split (" ") for i in x: if i in y: print (" word found ") else: print(" Not found ")

18th Jun 2021, 4:54 AM
SelvaKumar
5 Réponses
+ 6
You can simply try if y in x https://code.sololearn.com/c3E5N8k7h4Ic/?ref=app See this code! Hope it's helpful
18th Jun 2021, 5:06 AM
Abhiyantā
Abhiyantā - avatar
+ 5
if this is about the "Search engine" end of module project code coach, then the expected output should be: "Word found" or "Word not found"... case sensitive, no spaces before nor after ^^
18th Jun 2021, 5:13 AM
visph
visph - avatar
+ 3
Hi! Print word "word" with uppercase letter W
18th Jun 2021, 6:43 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Try using meaningful variable names
18th Jun 2021, 9:51 PM
Mina Puker
0
your code is good you need just to pay attention to the space , in your code you have one space added before "else" you just need to delete it and it will work
20th Jun 2021, 3:47 AM
Malek Hwaijeh