I have this code that seems to work just fine except that it's leaving out an "e"! The code is designed to loop through a given string, remove the vowels, then return the new anti-vowel string.
def anti_vowel(text):
anti_v = ''
for c in text:
if c in "aeiouAEIOU":
anti_v = text.replace(c, '')
else:
anti_v.join(c)
return anti_v
Test code:
anti_vowel("Hey look Words!")
This returns "Hey lk Wrds!"
What gives? Thanks!