input: Write a python function to calculate the sum of absolute differences for all pairs in a list.
  assert sum_diff_pair([1, 2, 3]) == 4
  assert sum_diff_pair([4, 1, 2]) == 6
  assert sum_diff_pair([5, 5, 5]) == 0
output: def sum_diff_pair(arr):
      total_sum = 0
      for i in range(len(arr)):
          for j in range(i + 1, len(arr)):
              total_sum += abs(arr[i] - arr[j])
      return total_sum