def using_split2(line, _len=len):
    """
    Credits to https://stackoverflow.com/users/1235039/aquavitae

    :param line: sentence
    :return: a list of words and their indexes in a string.
    """
    words = line.split(' ')
    index = line.index
    offsets = []
    append = offsets.append
    running_offset = 0
    for word in words:
        word_offset = index(word, running_offset)
        word_len = _len(word)
        running_offset = word_offset + word_len
        append((word, word_offset, running_offset))
    return offsets