Anti_vowel Please help me!


#1

I can't figure out the problems , please give me some advice:blush:

https://www.codecademy.com/courses/python-intermediate-en-rCQKw/1/2


#2

Refer to how you would do it manually, break that down into things you know how to do in python.
If there's trouble doing that, then identify what that trouble is, and then think about how you can figure that out, for example by revisiting an earlier exercise, googling, or asking


#3

I think my code is right, but it can't get right outcome. I don't know where are the problems. Could you help me out?

def anti_vowel(text):
text_list = list(text)

for x in text_list:
    if x.lower() in "aeiou":
        text_list.remove(x)
return "".join(text_list)

#4

#5

#6

If you print out x each iteration, you'll find that removing elements from text_list interferes with iterating through it (because you're causing the elements that follow to move)


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.