human
Create an array such that XOR of subarrays of length K is X | Function to construct the array.
Creating a list of size K , initialised with 0.
Initialising the first element with the given XOR.
Driver code"
Solution in Python:

Can you provide a code to create an array such that XOR of subarrays of length K is X and the other steps required?
assistant
#Here is code to create an array such that XOR of subarrays of length K is X and the other steps required.
 def constructArray ( N , K , X ) :
	ans = [ ]
	for i in range ( 0 , K ) :
		ans . append ( 0 )
	ans [ 0 ] = X
	for i in range ( 0 , N ) :
		print ( ans [ i % K ] , end = " ▁ " )
N = 5
K = 2
X = 4
constructArray ( N , K , X )