human
Write me a code to xOR of Sum of every possible pair of an array and the other steps required given the following:
XOR of Sum of every possible pair of an array | Function to find XOR of sum of all pairs.
Calculate xor of all the elements.
Return twice of xor value.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to xOR of Sum of every possible pair of an array and the other steps required.
 def findXor ( arr , n ) :
	xoR = 0 ;
	for i in range ( 0 , n ) :
		xoR = xoR ^ arr [ i ]
	return xoR * 2
arr = [ 1 , 5 , 6 ]
n = len ( arr )
print ( findXor ( arr , n ) )