then , t = '1234321
' NEW_LINE p = s + s [ - 2 : : - 1 ] NEW_LINE INDENT p_sq = int ( p ) ** 2 NEW_LINE if p_sq > R : NEW_LINE INDENT break NEW_LINE DEDENT if p_sq >= L and ispalindrome ( p_sq ) : NEW_LINE INDENT ans = ans + 1 NEW_LINE DEDENT DEDENT