I've been having issues with the Anti Vowel exercise. I had an idea to convert the string to a list, then use a while loop to iterate through it and replace the vowels.
I'm not getting an error in complier, but when I run it I get this error from code academy:
Oops, try again. Your code looks a bit off--it threw a "list index out of range" error. Check the Hint if you need help!
I'm not sure how the list index is out of range when I'm setting it to the length of the list. Is there something I'm missing?
def anti_vowel(text): count = 0 new = list(text) max_count = len(text) while count < max_count: if new[count] not in "aeiouAEIOU": new.pop(count) count += 1 str(new) return new