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 trialDotan Sharaby
652 Pointsremoving a letter
its seems a lot of people struggle with this.. and i couldn't understand what is wrong with the way i am doing it :S
def disemvowel(word):
vowels = ["a", "A", "e", "E", "o", "O", "i", "I","u", "U"]
word_list = list (word)
for vowel in vowels:
if vowel in word:
word_list.remove(vowels)
return word
1 Answer
Gustavo Winter
Courses Plus Student 27,382 PointsYou could check a detailed answer by Steven Park -> here
Like he say on the post, the ".remove()" method is for list not for String.
I hope you find the answer there.
If you don't, please tell me here and i i'll try to help you.