+ 1
Can anyone tell me what changes should be done to the code
This is the last project in python "search engine" https://code.sololearn.com/ceSM7PQk2Ybz/?ref=app
1 Odpowiedź
+ 3
Your function with if/else statement should be on top, then you should take input and only then call your function
Just like that:
def search (text, word):
if word in text:
print("Word found")
else:
print("Word not found")
text = input()
word = input()
search(text, word)