Please why does none attach to my results | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Please why does none attach to my results

def search (text, word ): if word in text: print ("Word found") else: print ("Word not found") text = input() word = input() print(search(text, word

6th Feb 2022, 6:15 AM
Dixon Afreh Frimpong
Dixon Afreh Frimpong - avatar
3 Answers
+ 2
Thank you very much
6th Feb 2022, 6:33 AM
Dixon Afreh Frimpong
Dixon Afreh Frimpong - avatar
+ 2
Thank you BroFar..
6th Feb 2022, 6:39 AM
Dixon Afreh Frimpong
Dixon Afreh Frimpong - avatar
+ 1
Dixon Afreh Frimpong inorder for the print to do print(search(text, word)) use the word return in place of the print statements you have in your define def search(text, word): if word in text: return "Word found" else: return "Word not found" text = input() word = input() print(search(text, word))
6th Feb 2022, 6:36 AM
BroFar
BroFar - avatar