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