input: Write a function to take two arrays of integers as input and swap their elements. Each element in the first array should be swapped with the corresponding element in the second array. If the arrays are of different lengths, raise an assertion error. Return the modified arrays with their elements swapped.
  
  def swap(arr1, arr2):
      assert len(arr1) == len(arr2)
      for i in range(len(arr1)):
          temp = arr1[i]
          arr1[i] = arr2[i]
          arr2[i] = temp
  
  arr1 = [3, 5, 6, 9]
  arr2 = [2, 4, 7, 8]
  swap(arr1, arr2)
  assert arr1 == [2, 4, 7, 8]
  assert arr2 == [3, 5, 6, 9]
output: def swap(arr1, arr2):
      assert len(arr1) == len(arr2)
      for i in range(len(arr1)):
          temp = arr1[i]
          arr1[i] = arr2[i]
          arr2[i] = temp