def reduce(function, iterable, start=None):
    iterator = iter(iterable)
if start is None:
    start = next(iterator)
for x in iterator:
    start = function(start, x)
return start
Набор всех подмножеств