Skip to content

Instantly share code, notes, and snippets.

@fmayer
Created January 15, 2013 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmayer/4542384 to your computer and use it in GitHub Desktop.
Save fmayer/4542384 to your computer and use it in GitHub Desktop.
>>> import itertools
>>> X = range(8)
>>> S = set()
... for x, y in itertools.combinations(X, 2):
... S |= set(itertools.product([x, y], repeat=8))
>>> len(S)
86: 7120
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment