0
In the last project in python for beginners. I don't understand
3 Antworten
+ 3
Corrected code:
text = input()
word = input()
def search(text , y):
if word in text:
return("Word found")
else:
return("Word not found")
print(search(text, word))
There is no need of splitting given text and you are giving splitted text to function to search in `text` which doesn't makes any sense.
+ 1
Last project in python for beginers is build search engine using functions.
What exacly you dont understand here?
Please post your code attempt so we can see where you make mistake and help you.
+ 1
text = input()
word = input()
y = text.split(",")
def search(text , y):
if y in text:
return("Word found")
else:
return("Word not found")
print(search(text, y))