def reverse_word(string,
                 word_start,
                 word_end):
    """
    reverses a sub string from start index to end index in place. 
    """
    # this whole function could be replaced by splicing
    # see the function below

    start = word_start
    end = word_end

    if end - start > 1:
        while start >= word_start and end <= word_end and start < end:
            string[start], string[end] = string[end], string[start]

            start += 1
            end -= 1

    return string