Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

all possible combinations in python

import itertools

list1 = list(range(5, 10))
list2 = [1, 2, 3]
list = [list1, list2]

combination = [p for p in itertools.product(*list)]
print(combination)
PythonCopy
Source by iq.opengenus.org #
 
PREVIOUS NEXT
Tagged: #combinations #python
ADD COMMENT
Topic
Name
8+2 =