Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def equi ( A ):
- suma = 0
- a_sum = sum(A)
- for i, x in enumerate(A):
- if suma == (a_sum-x)/2:
- return i
- suma += x
- return -1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement