Search engine (SOS)
Hi guy's i cant understand, in the last section of learning python for beginning, he ask you to write a search engine, and get a word from text, i write a program he work good and get correct result, but i get always the errors. So i try to write the program differently and i still get the same error. This is the both method i write : text = input(" enter the text : ") word = input("the word to search : ") def search(text, word): for i in text : if word in text : return f"word found : {word}" else : return "word not found" print(search(text, word)) #_________________________________ text = input(" enter the text : ") word = input("the word to search : ") def search(text, word): if word in text: return f"word found : {word}" else : return "word not found" print(search(text, word) So friends if someone know where's yhe problem, help me thank you đ