input: Write a function in python to split a given array into two parts with equal sum. The function should return True if it is possible to split the array into two parts with equal sum, otherwise it should return False. If the given array is empty, the function should return True.
  
  def split_equal_sum(arr):
      if not arr:
          return True
      total_sum = sum(arr)
      if total_sum % 2 != 0:
          return False
      half_sum = total_sum // 2
      current_sum = 0
      for num in arr:
          current_sum += num
          if current_sum == half_sum:
              return True
      return False
  
  assert split_equal_sum([1, 2, 3, 4]) == True
  assert split_equal_sum([1, 2, 3]) == False
  assert split_equal_sum([4, 1, 2, 3]) == True
  assert split_equal_sum([]) == True
output: def split_equal_sum(arr):
      if not arr:
          return True
      total_sum = sum(arr)
      if total_sum % 2 != 0:
          return False
      half_sum = total_sum // 2
      current_sum = 0
      for num in arr:
          current_sum += num
          if current_sum == half_sum:
              return True
      return False