human
Find array whose elements are XOR of adjacent elements in given array | Function to reconstruct the array arr [ ] with xor of adjacent elements.
Iterate through each element.
Store the xor of current and next element in arr [ i ].
Function to print array.
Driver Code.
Inputs.
Length of the array given.
Function call to reconstruct the arr [ ].
Function call to prarr [ ]"
How can the above be solved in Python?
 What is a code to find array whose elements are XOR of adjacent elements in given array and the other steps required?
assistant
#Here is code to find array whose elements are XOR of adjacent elements in given array and the other steps required.
 def game_with_number ( arr , n ) :
	for i in range ( n - 1 ) :
		arr [ i ] = arr [ i ] ^ arr [ i + 1 ]
	return arr
def printt ( arr , n ) :
	print ( * arr )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 10 , 11 , 1 , 2 , 3 ]
	n = len ( arr )
	new_arr = game_with_number ( arr , n ) ;
	printt ( new_arr , n )