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 trialKevin Caruso
3,930 PointsHow do i approach this problem?
Not quite sure if i'm in even on the right track. Any help would be appreciated!
def disemvowel(word):
vowels = ['a','e','i','o','u']
letters= ", ".split(word)
for letter in letters:
if letter.lower() in vowels:
letters.pop(letter)
"".join(letters)
return word
1 Answer
Pete P
7,613 PointsDouble check the documentation on .pop(). When using it, the parameter you give it is an integer representing the index of the character you wish to pop off the list. You cannot place a 'string' into the function. I agree with Dave, maybe try using .replace()
Dave Faliskie
17,793 PointsDave Faliskie
17,793 PointsMaybe try something with .replace() and your existing vowels list.