Skip to content

Instantly share code, notes, and snippets.

@AdamGold
Created March 9, 2019 16:27
Show Gist options
  • Save AdamGold/440af72d3961f87f0628a80b3bb11e29 to your computer and use it in GitHub Desktop.
Save AdamGold/440af72d3961f87f0628a80b3bb11e29 to your computer and use it in GitHub Desktop.
In [16]: import itertools
In [17]: list(itertools.combinations([1, 2, 3, 4], 2))
[(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment