Rotate the array by index value to the left
while ( len ( ret ) < len ( res ) ) : NEW_LINE INDENT ret . append ( res [ index ] ) NEW_LINE index = ( index + 1 ) % len ( res ) NEW_LINE DEDENT return ret NEW_LINE