No_vowel


#1

def anti_vowel(text):
    vowels = "aeiouAEIOU"
    vogue = ""
    for c in text:
        if c in vowels:
            vogue(c) = ""
        else:
            append.vogue(c)
    return vogue

what am i doing wrong??!


#2

here:

vogue(c) = ""

doing this will make vogue a function call, but vogue is a a string, not a function

remember the not keyword, maybe you can use it in your if condition?

here:

append.vogue(c)

the general syntax is:

yourList.append("item_to_append")

apart from placing append at the wrong place, vogue is not a list (append is a method for lists)

to concatenate strings, use +


#3

A post was split to a new topic: Anti_vowel


#4

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