Replace this line with your code.


do you have a question? An error? Code so we can trace the problem?


def anti_vowel(text):
    rem = " "
    code = ['a','A','e','E','I','i','o','O','u','U']
    for char in text:
        if char not in code:
            rem += char
    return rem

print(anti_vowel("Hey look Words!"))

This is my code and i got following error.

Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns " Hy lk Wrds!" when it should return "Hy lk Wrds!".


there is a space in front of hy, because here:

rem = " "

you have a (unwanted) space, declare rem with a empty string


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.