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

Todd Costa
Todd Costa
3,380 Points

Disemvowel works in workspace but does not pass test

Hey guys sorry but i'm getting frustrated. I understand this is not the best solution but as i said i was getting a little frustrated and i just wanted to pass.

This works in the WorkSpace and my local python install but will not pass the test. Unfortunately i saw the solution when looking for help so i know that now but i'd like to know why this isn't passing. I really wish this site showed us the test/results or some type of hint...

disemvowel.py
def disemvowel(word):
    word = word.lower()
    end_word = ""
    for letter in word:
        if letter in 'aeiou':
            continue
        else:
            end_word += letter
    return end_word

1 Answer

Todd Costa
Todd Costa
3,380 Points

Figured it out, had to do with capitalization and not returning the exact same case.