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!
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 trial
Chang Hyeon Lee
2,008 PointsI don't still get passing this challenge...
I need some help and explanation..
def disemvowel(word):
result = ''
vowels = ['a', 'e', 'i', 'o', 'u']
for letter in word:
if letter.lower not in vowels:
result += letter
return result
1 Answer
Max Ungless
8,838 PointsYour issue is in letter.lower, lower() is a function, so it should have () double parenthesis at the end.
Change this line:
if letter.lower not in vowels:
To:
if letter.lower() not in vowels:
Jay Bennett
10,564 PointsJay Bennett
10,564 PointsThe way you're doing it here is checking if the built-in method, 'lower' of string object '<letter>' can be found in your vowels list. Typing 'i'.lower by itself into the python command line will show you. To call the method lower on your letter, you'll need to add '()' to your method name. So if letter.lower() not in vowels: