def obfuscated_word(word, past_guesses):
    """ Returns a str with the correct guesses shown

    Given the string word and list past_guesses, return a string where the
    guesses are shown and the non-guessed characters are replaced with an
    underscore. For example, obfuscated_word('hello', ['e', 'o'])
    should return the str '_e__o'

    Args:
        word: a string
        past_guesses: a list of strings

    Returns:
        a new string with guesses and non-guesses
    """

    new_string = ''
    for element in word:
        if element in past_guesses:
            new_string += element
        else:
            new_string += '_'
    return new_string