human
Count subsequences having odd Bitwise XOR values from an array | Function to count the subsequences having odd bitwise XOR value.
Stores count of odd elements.
Stores count of even elements.
Traverse the array A [ ].
If el is odd.
If count of odd elements is 0.
Driver Code.
Given array A [ ].
Function call to count subsequences having odd bitwise XOR value"
How can the above be solved in Python?
 ... Write me a code to count subsequences having odd Bitwise XOR values from an array and the other steps required?
assistant
#Here is code to count subsequences having odd Bitwise XOR values from an array and the other steps required.
 def countSubsequences ( A ) :
	odd = 0
	even = 0
	for el in A :
		if ( el % 2 == 1 ) :
			odd += 1
		else :
			even += 1
	if ( odd == 0 ) :
		print ( 0 )
	else :
		print ( 1 << len ( A ) - 1 )
if __name__ == " _ _ main _ _ " :
	A = [ 1 , 3 , 4 ]
	countSubsequences ( A )