human
Count consonants in a string ( Iterative and recursive methods ) | Function to check for consonant.
To handle lower case.
To check is character is Consonant.
Driver code"
How can the above be solved in Python?

=====
What is a code to count consonants in a string ( Iterative and recursive methods ) and the other steps required?
assistant
#Here is code to count consonants in a string ( Iterative and recursive methods ) and the other steps required.
 def isConsonant ( ch ) :
	ch = ch . upper ( )
	return not ( ch == ' A ' or ch == ' E ' or ch == ' I ' or ch == ' O ' or ch == ' U ' ) and ord ( ch ) >= 65 and ord ( ch ) <= 90
def totalConsonants ( string ) :
	count = 0
	for i in range ( len ( string ) ) :
		if ( isConsonant ( string [ i ] ) ) :
			count += 1
	return count
string = " abc ▁ de "
print ( totalConsonants ( string ) )