from _palindrome_tools import is_palindrome


def is_Lychrel(num):
    """
    Returns False if num is palindromic within 50 iterations, otherwise
    return True.
    A palindrome may still be Lychrel.
    """
    for _ in range(50):
        num += int(str(num)[::-1])
        if is_palindrome(num):
            return False
    return True


def count_Lychrel_sub_10k():
    """
    Returns the number of Lychrel numbers below 10000.
    We are given that every non-Lychrel number below 10000 requires less than
    50 iterations.
    """
    return sum(is_Lychrel(a) for a in range(1, 10001))


def solve(vol=0):
    return count_Lychrel_sub_10k()

from _palindrome_tools import is_palindrome


def is_Lychrel(num):
    """
    Returns False if num is palindromic within 50 iterations, otherwise
    return True.
    A palindrome may still be Lychrel.
    """
    for _ in range(50):
        num += int(str(num)[::-1])
        if is_palindrome(num):
            return False
    return True


def count_Lychrel_sub_10k():
    """
    Returns the number of Lychrel numbers below 10000.
    We are given that every non-Lychrel number below 10000 requires less than
    50 iterations.
    """
    return sum(is_Lychrel(a) for a in range(1, 10001))


def solve(vol=0):
    return count_Lychrel_sub_10k()

Returns False if num is palindromic within 50 iterations, otherwise     return True.     A palindrome may still be Lychrel. Returns the number of Lychrel numbers below 10000.     We are given that every non-Lychrel number below 10000 requires less than     50 iterations.