input: def swap(arr1: List[int], arr2: List[int]):
      """ Swaps the elements of two given arrays. The arrays must be of the same length.
      >>> swap([3, 5, 6, 9], [2, 4, 7, 8])
      ([2, 4, 7, 8], [3, 5, 6, 9])
      """
output:     if len(arr1) != len(arr2):
          raise ValueError("Arrays must be of the same length")
      
      for i in range(len(arr1)):
          arr1[i], arr2[i] = arr2[i], arr1[i]
      
      return arr1, arr2