def my_part(my_list):
    item = my_list.pop()
balance = []
temp = [item, -item]
while len(my_list) != 0:
    new_player = my_list.pop()
for i, items in enumerate(temp):
    balance.append(items + new_player)
balance.append(items - new_player)
temp = balance[:]
balance = set(balance)
if 0 in balance:
    return 'YES'
else:
    return 'NO'
Как получить подмножество в алгоритме разбиения?