0
Can't anyone fix this code in the link
2 Answers
+ 1
Dont use âfor word...â take âif word..â
Or try it with âforâ and see what will happen.
And at the end call the function
def search ():
text = "today is hot"
word = "cold"
if word in text:
print ("word found")
else:
print("word not found")
search()
And change the indentations
0
What are you trying actually by code..?
Your code will not do anything because you not calling function to use it. You defined function . But not using it. To use it ,first call the function...
edit:
add calling statement search() statement at end..