random_numbers = [0, 0, -1, -1, -1, 1, -1, 3]
result_left = []
result_right = []
result = 0
for i in random_numbers:
result += i
result_left.append(result)
result = 0
for i in random_numbers[::-1]:
result += i
result_right.append(result)
result = [x + y for x, y in zip(result_left, result_right[::-1])]
print(result)
def find_balance_point(numbers):
total_sum = sum(numbers)
left_sum = 0
for i, num in enumerate(numbers):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1 # If no balance point is found, return -1