Anti_Vowel


#1

https://www.codecademy.com/courses/python-intermediate-en-rCQKw/1/2?curriculum_id=4f89dab3d788890003000096#

My function right now is only removing the first vowel it finds; any clues as to why it's not iterating in the loop?

def anti_vowel(text):
    non_vowels = ""
    for letter in text:
        for i in "aeiouAEIOU":
            if letter==i:
                non_vowels=text.replace(i,"")
                return non_vowels
            else:
                non_vowels=text
    print non_vowels
    

text = raw_input("Give me a word: ")
anti_vowel(text)

#2

def anti_vowel(text):
result=[]
for i in text:
if i=='a' or i=='A'or i=='e' or i=='E'or i=='i' or i=='I'or i=='o' or i=='O'or i=='u' or i=='U':
result.append("")
else:
result.append(i)
s="".join(result)
print s
return s
anti_vowel("hii baby i love you")


#3

as far as I know when you return, you end the loop and function in general. I'm having trouble understanding what your doing in the loop really though.
I learned some C++, so "continue" happens to carry over into python.
Here's my function:

def anti_vowel(text):
vowels = "AEIOUaeiou"
word = []
for item in text:
if item in vowels:
continue
else:
word.append(item)
word = "".join(word)
return word