human
Find a partition point in array to maximize its xor sum | Function to find partition point in array to maximize xor sum.
Traverse through the array.
Calculate xor of elements left of index i including ith element.
Calculate xor of the elements right of index i.
Keep the maximum possible xor sum.
Return the 1 based index of the array.
Driver code.
Function call"
How can the above be solved in Python?

Write me a code to find a partition point in array to maximize its xor sum and the other steps required?
assistant
#Here is code to find a partition point in array to maximize its xor sum and the other steps required.
 def Xor_Sum ( arr , n ) :
	sum = 0
	index , left_xor = 0 , 0
	right_xor = 0
	for i in range ( n ) :
		left_xor = left_xor ^ arr [ i ]
		right_xor = 0
		for j in range ( i + 1 , n ) :
			right_xor = right_xor ^ arr [ j ]
		if ( left_xor + right_xor > sum ) :
			sum = left_xor + right_xor
			index = i
	return index + 1
arr = [ 1 , 4 , 6 , 3 , 8 , 13 , 34 , 2 , 21 , 10 ]
n = len ( arr )
print ( Xor_Sum ( arr , n ) )