human
Perfect reversible string | This function basically checks if string is palindrome or not.
iterate from left and right.
Driver Code"
Solution in Python:
assistant
#Here is code to perfect reversible string and the other steps required.
 def isReversible ( str ) :
	i = 0 ; j = len ( str ) - 1 ;
	while ( i < j ) :
		if ( str [ i ] != str [ j ] ) :
			return False ;
		i += 1 ;
		j -= 1 ;
	return True ;
str = " aba " ;
if ( isReversible ( str ) ) :
	print ( " YES " ) ;
else :
	print ( " NO " ) ;