Compare each character from starting with its corresponding character from last
for i in range ( length // 2 ) : NEW_LINE INDENT if ( st [ i ] != st [ length - i - 1 ] ) : NEW_LINE INDENT return False NEW_LINE DEDENT DEDENT return True NEW_LINE