Make the middle row palindromic
if ( N % 2 == 1 ) : NEW_LINE INDENT for i in range ( M // 2 ) : NEW_LINE INDENT if ( mat [ N // 2 ] [ i ] != mat [ N // 2 ] [ M - 1 - i ] ) : NEW_LINE INDENT ans += 1 NEW_LINE DEDENT DEDENT DEDENT if ( M % 2 == 1 ) : NEW_LINE INDENT for i in range ( N // 2 ) : NEW_LINE DEDENT