For some reason, my loop won't complete. The error message is:
Oops, try again. Your function fails on antivowel("Hey look Words!"). It returns "Hy lk Words!" when it should return "Hy lk Wrds!"._
I can't understand why it won't loop thru the final word. I've tested the code out on outside IDE and the results seem to vary. For example, "Hello World!" will correctly return "Hll Wrld!", but some statements will leave out or fail to complete iterating on the final word. For example:
"Hello World! Hey look words!" >> "Hll Wrld! Hy lk words!"
"Hello World! Hey look tacos!" >> "Hll Wrld! Hy lk tcos!"
Replace this line with your code. def anti_vowel(text): vowels = ['A', 'a', 'E', 'e', 'I', 'i', 'O', 'o', 'U', 'u'] check = list(text) for letter in check: for vowel in vowels: if vowel == letter: check.remove(letter) return ''.join(check)