human
What is a code to check if a word is present in a sentence and the other steps required given the following:
Check if a word is present in a sentence | Function that returns true if the word is found.
To break the sentence in words.
To temporarily store each individual word.
Comparing the current word with the word to be searched.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to check if a word is present in a sentence and the other steps required.
 def isWordPresent ( sentence , word ) :
	s = sentence . split ( " ▁ " )
	for i in s :
		if ( i == word ) :
			return True
	return False
s = " Geeks ▁ for ▁ Geeks "
word = " Geeks "
if ( isWordPresent ( s , word ) ) :
	print ( " Yes " )
else :
	print ( " No " )