human
Find the value of N XOR 'ed to itself K times | Function to return n ^ n ^ ... k times.
Find the result.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to find the value of N XOR 'ed to itself K times and the other steps required.
 def xorK ( n , k ) :
	res = n
	for i in range ( 1 , k ) :
		res = ( res ^ n )
	return n
n = 123
k = 3
print ( xorK ( n , k ) )