import re


def get_number_location(
    input : str,
    ):
# endregion get_number_location header
# region get_number_location docs
    """
    get the string indices of all numbers that occur on the string

    format example: [ ( 0, 1 ), ( 4, 6 ), ( 9, 9 ) ]

    both begin and end are inclusive, in contrast with the way the std_lib does it
    which is begin(inclusive), end(exclusive)
    """
# endregion get_number_location docs
# region get_number_location implementation
    locations = []
    for match in re.finditer("\d+", input):
        # match start is inclusive
        position_start = match.start()
        # match end is exclusive
        position_end = match.end() - 1
        locations.append((position_start, position_end))
        ...
    return locations