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 trialDoyle Lardell
Courses Plus Student 888 Pointsperplexed
cant get it
def disemvowel(word):
vowel = ['a', 'e', 'i', 'o', 'u', 'A', 'E', "I", 'O', "U"]
try:
word.remove(vowel)
except ValueError:
pass
return word
1 Answer
Steven Parker
231,248 PointsThe "word" argument is a string, and strings do not have a "remove" method. Perhaps you were thinking of "replace"?
Or you could also convert the string into a list and then you could use "remove", but you'd need to convert it back later.
Either way, you'll probably need a loop since both methods take only scalar (not list) arguments.
Alex Koumparos
Python Development Techdegree Student 36,887 PointsAlex Koumparos
Python Development Techdegree Student 36,887 PointsYou haven't given enough detail about what you are trying to accomplish or where you're stuck.
Try reading this helpful guide from Stack Overflow on 'How Do I Ask a Good Question' and rephrase your question to make it easier for people to help you.