Your function fails on anti_vowel("Hey look Words!"). It returns "hey look words!" when it should return "Hy lk Wrds!"


#1

Can anyone help me with this! where am I going wrong?

def anti_vowel(text):
  text=text.lower()
  for i in range(0, len(text)):
    
    if text[i]=="a" or text[i]=="i" or text[i]=="o" or text[i]=="e" or text[i]=="u":
      text.replace(text[i], "")
  return text
  
print anti_vowel("I like Python")

#2

you execute a replace action, but don’t store the result of this replace action anywhere?


#3

Thanks… found my mistake…and now it works


#4