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

Please help , got stucked here

I tried plenty of things but doesnt work ,

disemvowel.py
def disemvowel(word):
    vowels = ["a", "e", "i", "o", "u", "A", "E", "I", "O", "U"]
    for vowel in vowels:
        if vowel in word:

    return word

2 Answers

Nader Alharbi
Nader Alharbi
2,253 Points

You need to loop through (word) and check if each letter is in (vowels) ... you can do it !

Krishna Desai
Krishna Desai
7,977 Points

IIRC, this exercise has you returning the word with all vowels removed.

I suggest looking at the str methods to see if any of them can help you to remove or transform a character.