Given a set
{0, 1, 2, 3}
How can I produce the subsets:
[set(), {0}, {1}, {2}, {3}, {0, 1}, {0, 2}, {0, 3}, {1, 2}
def powerset(some_set): res = [(a,b) for a in some_set for b in some_set] return res