- 1
text =input() word =input() def search(text,word): if word in text: return ("word found") else: return ("word not found") prin
What wrong it showing expected syntax line 5 the the first return statement any assistance
3 odpowiedzi
+ 8
First of all, you need to change your title to description and vice versa
+ 6
Your question is incomplete, so I had to guess.
The main problem was your indentation.
I surmised the rest of your code to create an output.
Simba has made a comment which is valid pertaining to your sequence of inputs Vs your function input sequence.
Because the sequences are reversed, it leads the user to incorrect input.
Your code:
text =input()
word =input()
def search(text,word):
if word in text:
return ("word found")
else:
return ("word not found")
print(search(text,word))
0
Don't understand you