def anti_vowel(text):
    new_str = text
    vow     = ("a","e","i","o","u","A","E","I","O","U")
    for x in text:
        if x in vow:
            new_str = text.replace (x, "")
    return new_str

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

Please help if you can?


text stays unaffected. This means, first e is removed:

Hy look words

then o is removed, but from text (which still contains hey look words

Hey look words

you need to replace and store the result in the same variable so you replace from updated string


Can you push me here, I dont get any way to store the new_str, which can replace the updated string


You can write:
new_str=" " and later add new_str+=x in the else condition


we have a string stored in a variable

we can execute a .replace() action on a string, and store the result of this replace action in the same variable


You're doing just one mistake there...

new_str = text.replace (x, "")
if you replace something in this line of code it'll work fine.

Another thing...
You could have done it without using if statement, just using tuple vow.


Got You, it worked. Thank You


I get it done. Thank You