his
Prompt
Complete the following Python function: ```python def remove_vowels(text): """ remove_vowels is a function that takes string and returns string without vowels. >>> remove_vowels('') '' >>> remove_vowels("abcdef\nghijklm") 'bcdf\nghjklm' >>> remove_vowels('abcdef') 'bcdf' >>> remove_vowels('aaaaa') '' >>> remove_vowels('aaBAA') 'B' >>> remove_vowels('zbcd') 'zbcd' """ ```
Answer guidance
Canonical solution (function body): return "".join([s for s in text if s.lower() not in ["a", "e", "i", "o", "u"]])
Drag to resize