Skip to content

Instantly share code, notes, and snippets.

@gsiegman
Last active December 21, 2015 02:18
Show Gist options
  • Save gsiegman/6233541 to your computer and use it in GitHub Desktop.
Save gsiegman/6233541 to your computer and use it in GitHub Desktop.
from itertools import combinations
my_list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l']
num_combs = len([i for i in combinations(my_list, r=3)])
print num_combs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment