input: Write a Python function that rearranges an array by moving a specified number of elements from the beginning to the end.
  assert rearrange_array([12,10,5,6,52,36],6,2) == [5,6,52,36,12,10]
  assert rearrange_array([1,2,3,4],4,1) == [2,3,4,1]
  assert rearrange_array([0,1,2,3,4,5,6,7],8,3) == [3,4,5,6,7,0,1,2]
output: def rearrange_array(arr, n, k):
      return arr[k:] + arr[:k]