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