input: 
  def split_equal_sum(arr):
      """
      Split a given array into two parts having equal sum.
      >>> split_equal_sum([1, 2, 3, 4])
      True
      >>> split_equal_sum([1, 2, 3, 4, 5])
      False
      """
      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
  
output:     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