human
Narcissistic number | function to count digits.
Returns true if n is Narcissistic number.
Count the number of digits.
Calculates the sum of digits raised to power.
Driver code"
How can the above be solved in Python?

Can you provide a code to narcissistic number and the other steps required?
assistant
#Here is code to narcissistic number and the other steps required.
 def countDigit ( n ) :
	if ( n == 0 ) :
		return 0
	return ( 1 + countDigit ( n // 10 ) )
def check ( n ) :
	l = countDigit ( n )
	dup = n ; sm = 0
	while ( dup ) :
		sm = sm + pow ( dup % 10 , l )
		dup = dup // 10
	return ( n == sm )
n = 1634
if ( check ( n ) ) :
	print ( " yes " )
else :
	print ( " no " )