input: Write a function in python to split an given array into two parts with equal sum. If it is possible to split the array into two parts with equal sum, return True. If it is not possible, return False. If the array is empty, return True.
  
  def split_equal_sum(arr):
      n = len(arr) 
      leftsum = 0
      rightsum = sum(arr)
      
      for i in range(n): 
          rightsum -= arr[i]
          if leftsum == rightsum:
              return True 
          leftsum += arr[i] 
      return False
  
  assert split_equal_sum([1, 2, 3, 4])==False
  assert split_equal_sum([1, 1, 1, 2, 1])==True
  assert split_equal_sum([1, 3, 2, 2, 4])==True
  assert split_equal_sum([1, 2])==False
  assert split_equal_sum([])==True
output: def split_equal_sum(arr):
      n = len(arr) 
      leftsum = 0
      rightsum = sum(arr)
      
      for i in range(n): 
          rightsum -= arr[i]
          if leftsum == rightsum:
              return True 
          leftsum += arr[i] 
      return False