Anti_vowel


#1



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


When I run the program I get the error: "string indices must be integers, not str". I'm not sure where going wrong. Thanks in advance for the help!


def anti_vowel(text):
    for c in "aeiouAEIOU":
        if c == text[c]:
            text.pop(c)
    return text


#2

strings are immutable, you can't remove/pop from strings


#3

Too simple... Thanks!!


#4

if you need more help, post an updated version of your code


#5

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