Remove the Vowels
Imagine a text filter that quiets a noisy comment by removing all of its vowels. Write disemvowel, which removes the English vowels a, e, i, o, and u from the string s, in either uppercase or lowercase. Every other character — spaces, punctuation, line breaks, and consonants — should stay exactly where it is.
Примеры
Ввод
"This website is for losers LOL!"Вывод
"Ths wbst s fr lsrs LL!"Ввод
"No offence but,\nYour writing is among the worst I've ever read"Вывод
"N ffnc bt,\nYr wrtng s mng th wrst 'v vr rd"Ввод
""Вывод
""Нужно реализовать
def disemvowel(s: str) -> str:
Теги
strings
Přihlaste se, abyste viděli historii odevzdání
Přihlásit sePřihlaste se, abyste mohli použít AI mentora
Přihlásit seVisible tests
1
Input
"This website is for losers LOL!"Expected
"Ths wbst s fr lsrs LL!"2
Input
"No offence but,\nYour writing is among the worst I've ever read"Expected
"N ffnc bt,\nYr wrtng s mng th wrst 'v vr rd"3
Input
""Expected
""4
Input
"aeiouAEIOU"Expected
""5
Input
"xyz"Expected
"xyz"6
Input
"a"Expected
""Focus radio
Paused · SomaFM · Fluid