Last active
August 29, 2015 14:07
-
-
Save dhermes/830b2c3fccfda81f3b73 to your computer and use it in GitHub Desktop.
itertools-product-example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import itertools | |
>>> for pair in itertools.product((0, 1), repeat=2): | |
... print pair | |
... | |
(0, 0) | |
(0, 1) | |
(1, 0) | |
(1, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment