human
Write me a code to count pairs with Odd XOR and the other steps required given the following:
Count pairs with Odd XOR | A function will return number of pair whose XOR is odd.
To store count of odd and even numbers.
Increase even if number is even otherwise increase odd.
Return number of pairs.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to count pairs with Odd XOR and the other steps required.
 def countXorPair ( arr , n ) :
	odd = 0
	even = 0
	for i in range ( n ) :
		if arr [ i ] % 2 == 0 :
			even += 1
		else :
			odd += 1
	return odd * even
if __name__ == " _ _ main _ _ " :
	arr = [ 1 , 2 , 3 ]
	n = len ( arr )
	print ( countXorPair ( arr , n ) )