- 1
I need the answer for this question in below..please help me solve this code
Youāre working on a search engine. Watch your back Google! The given code takes a text and a word as input and passes them to a function called search(). The search() function should return "Word found" if the word is present in the text, or "Word not found", if itās not. Sample Input "This is awesome" "awesome" Sample Output Word found https://code.sololearn.com/cM99916XV4ld/?ref=app
2 Answers
+ 1
SOUNDARYAN L ,
āŖļøplease do not post anything (code from Anas Dharar) that has no relation to your question.
āŖļøbefore we can help you, you should show us your attempt first. if you have not done a try by yourself upto now, please do so. Put your code in playground and link it here.
thanks!
0
What does the given code do ? I see that code doesn't relate with your question.
Anyway this problem can be solved very easy with:
1- in operator:
print('Hi' in 'Hi there')
2- re module:
print(bool(re.match('Hi','Hi there')))