def anti_vowel(text): anti = "" vowels = ['A','E','I','O','U','a','e','i','o','u'] for char in text: if char not in vowels: anti = anti + char return anti code example
Example: def anti_vowel(text): anti = "" vowels = ['A','E','I','O','U','a','e','i','o','u'] for char in text: if char not in vowels: anti = anti + char return anti
def is_vowel(char):
all_vowels = 'aeiou'
return char in all_vowels
print(is_vowel('c'))
print(is_vowel('e'))