human
Split the array and add the first part to the end | Python program to split array and move first part to end ..
Rotate array by 1..
main"
How can the above be solved in Python?
 Can you provide 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 splitArr ( arr , n , k ) :
	for i in range ( 0 , k ) :
		x = arr [ 0 ]
		for j in range ( 0 , n - 1 ) :
			arr [ j ] = arr [ j + 1 ]
		arr [ n - 1 ] = x
arr = [ 12 , 10 , 5 , 6 , 52 , 36 ]
n = len ( arr )
position = 2
splitArr ( arr , n , position )
for i in range ( 0 , n ) :
	print ( arr [ i ] , end = ' ▁ ' )