Given an array of numbers (assume the array has three or more values), should return an index where the sums of the elements on either side of that index are equal; how would you solve it for examples like [2, 3, 4, 4, 1]?
Implement find_pivot_index(nums). Return any valid index, or -1 when no such index exists. The pivot value itself is excluded from both sums. Input is a list of integers, and output is an integer index.
def find_pivot_index(nums):