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

Sergej Dolezil
Sergej Dolezil
958 Points

Code works fine in workspace but not in challenge..

HI,

could someone please take a look at my code, it seems to work fine in workspace but I keep getting an error when trying to submit in the challenge ("Bummer! Hmm, got some vowels back) which I do not get in workspace.

I passed the challenge with a previous version which did not work in workspace, so I kept on debugging until I got this version which seems fine to me.

thanks a lot, S

disemvowel.py
def disemvowel(word):
    vowels = ['a', 'e', 'i', 'o', 'u']
    spltword = list(word)
    for letter in word:
        if letter in vowels:
            spltword.remove(letter)
    word = "".join(spltword)
    return word

1 Answer

Umesh Ravji
Umesh Ravji
42,386 Points

Check out this discussion from the other day where a mod points out that this challenge is buggy :)

https://teamtreehouse.com/community/i-am-stuck-on-challenge-1-of-python-collections

Sergej Dolezil
Sergej Dolezil
958 Points

Thanks a lot Umesh!

cheers, S