def find_index(li): if not li or len(li) == 0: return li_sum = sum(li) left_total = 0 for i in range(len(li)): left_total += li[i] right_total = li_sum - left_total if left_total == right_total: return i