How can I replace the vowels of a word with underscores in python?
<p>I'm a beginner learning the python language and I'm stumped on how take the vowels of a word and replacing them with an underscore. </p>

<p>So far this is what I have come up with and it just doesn't work</p>

<pre><code>word = input("Enter a word: ")
new_word = ""
vowels = "aeiouy"


for letter in word:
    if letter != vowels:
        new_word += word
    else:
       new_word += "_"
       print(new_word)
</code></pre>

<p>Make vowels an array with each element it's own letter.</p>

<p>Then do</p>

<pre><code>for letter in word:
    if letter in vowels:
        letter = "_"
</code></pre>

python