human
Split the array and add the first part to the end | Function to spilt array and move first part to end.
make a temporary array with double the size and each index is initialized to 0.
copy array element in to new array twice.
Driver code"
How can the above be solved in Python?
 Give me a code to split the array and add the first part to the end and the other steps required?
assistant
#Here is code to split the array and add the first part to the end and the other steps required.
 def SplitAndAdd ( A , length , rotation ) :
	tmp = [ 0 for i in range ( length * 2 ) ]
	for i in range ( length ) :
		tmp [ i ] = A [ i ]
		tmp [ i + length ] = A [ i ]
	for i in range ( rotation , rotation + length , 1 ) :
		A [ i - rotation ] = tmp [ i ] ;
arr = [ 12 , 10 , 5 , 6 , 52 , 36 ]
n = len ( arr )
position = 2
SplitAndAdd ( arr , n , position ) ;
for i in range ( n ) :
	print ( arr [ i ] , end = " ▁ " )
print ( )