Welcome to the Treehouse Community
Looking to learn something new?
Need help with disemvowel challenge
Team - having trouble with disemvowal code challenge which is part of the python collections unit. Code is below. It would be helpful to get a hint or indication if I'm on the right path - no completed code if that's ok.
Thanks for your help.
def disemvowel(word): while True: #while loop to iterate through word and remove vowels user_word.remove(vowels) return word user_word = input("Please type in a word. ") #user input for word user_word = user_word.upper() #change input to upper case user_word = user_word.split() #change input to a list to allow vowels = ["a", "e", "i", "o", "u"] #make list of items to be removed disemvowel(user_word) #call function
Steven Parker220,974 Points
You've got some bits that could be part of a solution, but not in the right place. For the challenge, all the code needs to be inside the function. And you won't need to call the function yourself (the challenge does that).