0

Why is wrong?

def search(text, word): if word in text: return print ("Word found") text = input() word = input() print(search(text, word)) Wrong output: Word found None

7th Jul 2022, 7:32 PM
Š¢ŠµŃ€ŠµŃ‰ŠµŠ½ŠŗŠ¾ Š”Š¼ŠøтрŠøŠ¹
Š¢ŠµŃ€ŠµŃ‰ŠµŠ½ŠŗŠ¾ Š”Š¼ŠøтрŠøŠ¹ - avatar
1 Answer
0
return "Word found" #just use it, Without print. Function print don't return anything.. https://www.sololearn.com/discuss/3057041/?ref=app
7th Jul 2022, 7:35 PM
Jayakrishna šŸ‡®šŸ‡³