Middle element of odd length palindromic string is not compared
if ( lengthOdd ) : NEW_LINE INDENT i = i + 2 NEW_LINE DEDENT while ( i < n and len ( s ) > 0 ) : NEW_LINE INDENT if ( s [ len ( s ) - 1 ] == str [ i ] ) : NEW_LINE INDENT s . pop ( ) NEW_LINE DEDENT else : NEW_LINE INDENT break NEW_LINE DEDENT i = i + 2 NEW_LINE DEDENT