import itertoolsprint list(itertools.product([0, 1], repeat=3))
Standard input is empty
[(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!