human
Check if all the palindromic sub | Function to check if the string is palindrome.
Function that checks whether all the palindromic sub - strings are of odd length ..
Creating each substring.
If the sub - string is of even length and is a palindrome then , we return False.
Driver code"
Solution in Python:
assistant
#Here is code to check if all the palindromic sub and the other steps required.
 def checkPalindrome ( s ) :
	for i in range ( len ( s ) ) :
		if ( s [ i ] != s [ len ( s ) - i - 1 ] ) :
			return False
	return True
def CheckOdd ( s ) :
	n = len ( s )
	for i in range ( n ) :
		x = " "
		for j in range ( i , n ) :
			x += s [ j ]
			if ( len ( x ) % 2 == 0 and checkPalindrome ( x ) == True ) :
				return False
	return True
s = " geeksforgeeks "
if ( CheckOdd ( s ) ) :
	print ( " YES " )
else :
	print ( " NO " )