Last active
December 5, 2017 21:01
-
-
Save supki/4643955 to your computer and use it in GitHub Desktop.
Lists cartesian product oneliner in python.
This file contains hidden or 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
| from os import popen | |
| def f(xs): | |
| return eval(popen("""ghc -ignore-dot-ghci -e "sequence %s" """ % xs).read()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Much better than
itertools.product👍