Anti_vowel


#1

Hi Can any one help me to solve this program?


#2

You could print out the list you're removing from along with the value you're trying to remove from it to verify what that error message is claiming


#3

Hi, hear we have to remove vowels. Is my program correct.


#4

Hey. I solved it by using this method, does this help? I tried to keep it as simplistic as possible.


#5

elliottmoore seems to have found an elegant solution. My solution is below, though I felt there must be an easier way. `

def anti_vowel(text):
    txt = ""
    character = 0
    while character <= len(text) - 1:
        if text[character] in "AEIOUaeiou":
            txt = txt
            character = character + 1
        else:
            txt = txt + text[character]
            character = character + 1
    else:
        return txt

`


#6

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