def solution(A):
# write your code in Python 3.6
result = 100000
P = 1
while P < len(A):
B=sum(A[0:P])
C=sum(A[P:])
result = min(result,abs(B-C))
P +=1
return result
pass