Hello, my code for this lesson seems to be misbehaving.
def anti_vowel(text): string = list(text) for c in string: if c in "aeiouAEIOU": string.remove(c) string = ''.join(string) return string print anti_vowel('Hey Look Words!')
This is my code, it works normally for ‘Hey’ and ‘Look’, removing the vowels as intended. When it gets to ‘Words’ though, it does not remove the ‘o’. I can’t really think of a reson why this would happen. Any insight would be great.