as you can see in the output window,
e does get removed (first line in the output window)
text contains the string we want to remove the vowels from.
so we loop over text, and if we find a vowel, we replace the vowel with an empty string.
the problem is, you replace characters from
text and store the result of this replace action in variable
This won't work, because text will keep all its vowels, so the last replace action eventually ends up in the variable
when replacing vowels with empty strings, store in
text, so text gets updated.
you can see this much better if you where to do something like:
print anti_vowel("dust do this he as")