input: Write a function in python to split an given array into two parts with equal sum.
  
  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, 3, 4, 2])==True
  assert split_equal_sum([1, 1, 2, 2])==True
  assert split_equal_sum([1, 2, 3, 1, 1, 4])==True
  assert split_equal_sum([])==False
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