human
Count of N | Function to return the factorial of n.
Function to return the count of n - digit numbers with all distinct digits.
Driver code"
How can the above be solved in Python?
 ... Write me a code to count of N and the other steps required?
assistant
#Here is code to count of N and the other steps required.
 def factorial ( n ) :
	if ( n == 0 ) :
		return 1 ;
	return n * factorial ( n - 1 ) ;
def countNum ( n ) :
	if ( n > 10 ) :
		return 0 ;
	return ( 9 * factorial ( 9 ) // factorial ( 10 - n ) ) ;
if __name__ == " _ _ main _ _ " :
	n = 3 ;
	print ( countNum ( n ) ) ;