Finding the length upto which the suffix and prefix forms a palindrome together
for i in range ( n // 2 ) : NEW_LINE INDENT if ( st [ i ] != st [ n - i - 1 ] ) : NEW_LINE INDENT length = i NEW_LINE break NEW_LINE DEDENT DEDENT