def subsetsum(l):
    l = list(l)
target = max(l)
l.remove(l)
for subset_size in range(1 + len(l)):
    for subset in itertools.combinations(l, subset_size):
        if sum(subset) == target:
            return True
return False
looping through loops in python?