Antivowel


#1

Hello everyone i have a weird problem with this exercise even if my code works it gives me an error i tried even with the python idle and it doesn't give me any error


#2

Can you copy paste your code to the forum so i can run it?


#3

Of course here you have it:

def anti_vowel(text):
    vowel=['a','e','i','o','u','A','E','I','O','U']
    text=list(text)
    newl=[]
    for text in text:
        if text==' ':
            newl.append(text)
        if text not in vowel:
            newl.append(text)
    text=''.join(newl)
    return text

#4

this lines:

        if text==' ':
            newl.append(text)

cause the problems, remove them

your other if conditions handles the spaces just fine


#5

thank you man it helped a lot


#6