human
What is a code to check if a string contains two non overlapping sub and the other steps required given the following:
Check if a string contains two non overlapping sub | Function that returns true if s contains two non overlapping sub strings " geek " and " keeg ".
If " geek " and " keeg " are both present in s without over - lapping and " keeg " starts after " geek " ends.
Driver code"
Solution in Python:
assistant
#Here is code to check if a string contains two non overlapping sub and the other steps required.
 def isValid ( s ) :
	p = " "
	p = s . find ( " geek " )
	if ( s . find ( " keeg " , p + 4 ) ) :
		return True
	return False
if __name__ == " _ _ main _ _ " :
	s = " geekeekeeg "
	if ( isValid ( s ) ) :
		print ( " Yes " )
	else :
		print ( " No " )