Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python compute all combinations

import itertools

stuff = [1, 2, 3]
for L in range(len(stuff) + 1):
    for subset in itertools.combinations(stuff, L):
        print(subset)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #compute #combinations
ADD COMMENT
Topic
Name
4+2 =