Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to pairwise permute in python

>>> import itertools
>>> x = [1,2,3,4]
>>> list(itertools.combinations(x, 2))
[(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pairwise #permute #python
ADD COMMENT
Topic
Name
1+1 =