Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (2016, retired 2019) Lists Disemvowel

Vedang Patel
Vedang Patel
7,114 Points

I even tried it on workspaces but it says got some vowels back

please if you find the answer write the answer in the comment section

disemvowel.py
def disemvowel(word):
    word_list = list(word)
    try:
        while True:
            word_list.remove("a")
    except ValueError:
        pass
    try:
        while True:
            word_list.remove("e")
    except ValueError:
        pass
    try:
        while True:
            word_list.remove("i")
    except ValueError:
        pass
    try:
        while True:
            word_list.remove("o")
    except ValueError:
        pass
    try:
        while True:
            word_list.remove("u")
    except ValueError:
        pass
    word = ''.join(word_list)
    return word

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! There seems to be some problem with this particular challenge in its current state. I've submitted a report to Support about it. For the time being, try relaunching the challenge, and without typing anything, press the "Check Work" button. It will likely pass, even though it really shouldn't at this point.

Hope this helps! :sparkles: