def edit_distance(left_word: str, right_word: str) -> int:
    """ The difference between same-length words in number of edits

    The result is the edit distance of the two words (number of
    substitutions required to tranform left_word into right_word).

    Args:
        left_word: One word to compare
        right_word: The other word to compare

    Returns:
        An integer representing the edit distance

    Raises:
        ValueError: If the lengths of the word args are different
    """
    if len(left_word) != len(right_word):
        raise ValueError("Word ladder words must be same length")

    distance = 0;
    for i in range(len(left_word)):
        if left_word[i] != right_word[i]:
            distance += 1
    return distance