def anti_vowel(text): vowel = ["a","e","i","o","u" ] for letter in text: if letter in vowel: text.remove(letter) return text
I figured out the issue using a method involving me using 'not in text' rather than what's there originally. So I completed this lesson.
But I can't seem to figure out why "text.remove(letter)" always seems to catch a "str has no attribute remove' exception. I thought that the format was list.remove(str) and since "letter" served as the variable for each letter in the original word that this code should work fine.
What am I missing here to make this code work?