Import directives

In [1]:
import itertools

Product

In [2]:
list(itertools.product((0, 1), repeat=3))
Out[2]:
[(0, 0, 0),
 (0, 0, 1),
 (0, 1, 0),
 (0, 1, 1),
 (1, 0, 0),
 (1, 0, 1),
 (1, 1, 0),
 (1, 1, 1)]