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 trialHasan Basri Tosun
5,228 Pointscannot see what is the problem here
When I run the code in pycharm, I can remove all the vowels, however in the challenge I get the error message " got back letters I wasnt expecting"
Thanks for the help.
def disemvowel(word):
removal = list(word)
vowel = ["a", "e", "i", "o", "u", "A","E","I","O","U"]
i = 0
while i< len(vowel) :
i +=1
for k in word:
if k == vowel[i-1]:
removal.remove(k)
del vowel[i-1]
word = "".join(removal)
print(word)
1 Answer
james south
Front End Web Development Techdegree Graduate 33,271 Pointsyou are printing instead of returning the disemvoweled word.