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 trialBlake Golliher
5,943 PointsI think there's a solution checker bug, this code works locally.
this doesn't pass the python-collections-2/lists/disemvowel test, but it should. At least I think so.
def disemvowel(word): vowels = 'aeiouAEIOU' return word.translate(None, vowels)
print disemvowel(word)
def disemvowel(word):
vowels = 'aeiouAEIOU'
print word.translate(None, vowels)
This also fails to pass the test.
import string
def devowel(word): print word word = string.replace(word, 'a', '') word = string.replace(word, 'e', '') word = string.replace(word, 'i', '') word = string.replace(word, 'o', '') word = string.replace(word, 'u', '') return word
3 Answers
james south
Front End Web Development Techdegree Graduate 33,271 Pointsyour original code prints instead of returning, and while it works in python 2.7 i think the checker is 3.6. the translate method changed between versions and translate no longer takes 2 arguments.
james south
Front End Web Development Techdegree Graduate 33,271 Pointsalso replace in the string module seems to be deprecated in 3.x
Blake Golliher
5,943 Pointsah okay. Should have checked if these work in 3 before trying. Thank you for your answer!