input: Write a function to take as input two arrays of integers and swap their elements. The function should ensure that the two arrays have the same length before performing the swap. If the arrays are not of the same length, the function should raise an assertion error.
  assert swap([3, 5, 6, 9], [2, 4, 7, 8]) == None
  assert swap([1, 2, 3], [4, 5, 6]) == None
  assert swap([1, 2], [3, 4]) == None
  assert swap([7, 8, 9], [10, 11, 12]) == None
  assert swap([1], [2]) == None
output: def swap(arr1, arr2):
      assert len(arr1) == len(arr2), "Arrays must have the same length"
      arr1[:], arr2[:] = arr2[:], arr1[:]