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 trialDaniel Smith
10,172 PointsI dont know why but my code works in other IDEs but not here..
here are the versions i used that worked elsewhere: def disemvowel(word): word_list=list(word) new_word_list=[] for e in word_list: if e not in ('aeiouAEIOU'): new_word_list.append(e) word_list=new_word_list new_word=''.join(word_list) print(new_word)
and:
def disemvowel(word): word=[e for e in word if e not in ('aeiouAEIOU')] new_word=''.join(word) print(new_word)
def disemvowel(word):
word_list=list(word)
new_word_list=[]
for e in word_list:
if e not in ('aeiouAEIOU'):
new_word_list.append(e)
word_list=new_word_list
new_word=''.join(word_list)
print(new_word)
2 Answers
Elijah Quesada
Front End Web Development Techdegree Graduate 32,965 PointsYour function does exactly what the challenge asks for. You just need to return new_word. Currently all your doing is printing it to the console.
Daniel Smith
10,172 Pointsahh thanks! i get confused with those two often
Elijah Quesada
Front End Web Development Techdegree Graduate 32,965 PointsNp, been there and done that plenty of times.