mirror of
https://github.com/alvierahman90/otfmacros.git
synced 2024-12-15 12:01:59 +00:00
15 lines
481 B
Python
15 lines
481 B
Python
|
def is_consonant(letter):
|
||
|
if not isinstance(letter, str):
|
||
|
raise ValueError("Argument 'letter' must be type str")
|
||
|
if len(letter) != 1:
|
||
|
raise ValueError("Argument 'letter' must be 1 long")
|
||
|
return not is_vowel(letter)
|
||
|
|
||
|
def is_vowel(letter):
|
||
|
if not isinstance(letter, str):
|
||
|
raise ValueError("Argument 'letter' must be type str")
|
||
|
if len(letter) != 1:
|
||
|
raise ValueError("Argument 'letter' must be 1 long")
|
||
|
return letter in 'aeiou'
|
||
|
|