human
Count of numbers whose 0 th and Nth bits are set | Function to return the count of n - bit numbers whose 0 th and nth bits are set.
Driver code"
How can the above be solved in Python?

Write me a code to count of numbers whose 0 th and Nth bits are set and the other steps required?
assistant
#Here is code to count of numbers whose 0 th and Nth bits are set and the other steps required.
 def countNum ( n ) :
	if ( n == 1 ) :
		return 1
	count = pow ( 2 , n - 2 )
	return count
n = 3
print ( countNum ( n ) )