Feb-26-2021, 09:52 AM
A combination of
The conditional does containment checking for each char. Before the comparison is made, the char is made lower case.
"".join()
and a generator expression with conditional.The conditional does containment checking for each char. Before the comparison is made, the char is made lower case.
VOWELS = "aeiou" text = input("Enter your text: ") only_vowels = "".join(char for char in text if char.lower() in VOWELS) no_vowels = "".join(char for char in text if char.lower() not in VOWELS)
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!