Function to left rotate
def left_rotate ( arr ) : NEW_LINE INDENT last = arr [ 1 ] ; NEW_LINE for i in range ( 3 , len ( arr ) , 2 ) : NEW_LINE INDENT arr [ i - 2 ] = arr [ i ] NEW_LINE DEDENT arr [ len ( arr ) - 1 ] = last NEW_LINE DEDENT