lets say i have 2 lists:
lista = [1,2,3,5,6,7]
listb = [4,5,6,7,8,9,10]
The lists can be different lengths, and may not allways be unequal lengths.
The higher average will allways be in listb, so that is the 1 constant we can rely on.
This works for even teams:
average = float(sum(lista) + sum(listb)) / \
float(len(lista) + len(listb))
value = round(abs((average * len(lista)) - sum(lista)))
value would return the number i needed to move from listb to lista
i tried this,but it doesnt seem to work:
Offset = float(len(listb) - len(lista))
value = round(((len(lista) * sum(lista)) + \
(len(lista) * Offset) - \
(average * len(lista) - \
(average * Offset))) / \
(len(lista) * Offset))
any ideas?