def cube(n):
    singletons = [frozenset([x]) for x in range(n)]
    return dict([(x, frozenset([x^s for s in singletons]))
                 for x in powerset(range(n))])
Graph of n-dimensional hypercube.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_set.py/cube