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

Python Python Collections (2016, retired 2019) Lists Disemvowel


Hi guys,

I'm not sure why I'm getting an EOF Error here.

Please advise.

def disemvowel(word):

    word = input("What is your favourite colour?\n> ")

    remove_vowels = ["A","E", "I", "O", "U", "a", "e", "i", "o", "u"]


    except ValueError:

        return word

1 Answer

Chris Freeman
Chris Freeman
Treehouse Moderator 68,404 Points

The input statement is not needed. The challenge checker will call the function by supplying a string argument. This string will be automatically assigned to word. By including the input statement, the checker hangs since it is not expecting to supply any input.

Also, since word is a string (type str), the isn't a .remove() method available.

Post back if you need more help. Good luck!

Thanks Chris, can I create a .remove() method or is that not necessary?


Chris Freeman
Chris Freeman
Treehouse Moderator 68,404 Points

You can not add methods to built-in types such as str. You could create your own class that extends str but that is way beyond what is necessary to solve this challenge.