8.anti_vowel


#1



whats wrong with my code?
def anti_vowel(text):
    for i in text:
        if not i in "aeiouAEIOU":
            return i


#2

the moment a constant is reached in your code, that letter is returned. That is what your code does.

what is wrong with your code, is that it is just the start of the program you are suppose to build.

Try appending all constants to a new list/string, and then return that


#3

it stile dose not work

def anti_vowel(text):
    notv = ""
    for i in text:
        if not i in "aeiouAEIOU":
            notv.append(i)
    return notv

#4

well, it is a good improvement. .append() is a build in function to append items to a list.

to join a string you need the + sign:

test = "ay"
test = test + " hoy"

#5

thanks