def _get_number(s, init=0):
    """
    Extracts a sequence zero of more digits from the front of string 's' and converts them to the
    integer equivalent. The process stops when the string is exhausted or the first non-digit
    character is encountered.

    For example, _get_number('123hello') will yield the tuple (123, 'hello').

    :param s: A string starting with zero of more digits.
    :param init: The initial integer value.
    :return: A tuple containing the remaining part of the string and the integer value.
    """

    return _get_number(s[1:], init * 10 + int(s[0])) if len(s) > 0 and s[0].isdigit() else (s, init)