I thought my code would skip any vowels, and concatenate any non vowel characters to the new_string. However, only the '!' is concatenated.
the error message is this
Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns "!" when it should return "Hy lk Wrds!".
def anti_vowel(text): new_string = "" for c in text: if c in "aeiouAEIOU": continue else: new_string = new_string + c return new_string
Can anyone please advise me If my strategy is poor, or have I made an error with the code?
This is my first forum post so apologies if it isn't a good one.