def wordview_update(word, attempt, wordview):
    """Update word view according to attempt."""


    for (idx, letter) in enumerate(word):
        if letter == attempt:
            wordview[idx] = letter
    return wordview