Answers for "how to find all combinations of lists in a list"

6

get all combinations from two lists python

a = ["foo", "melon"]
b = [True, False]
c = list(itertools.product(a, b))
>> [("foo", True), ("foo", False), ("melon", True), ("melon", False)]
Posted by: Guest on April-21-2020
1

python get all combinations of list

itertools.combinations(iterable, r)
Posted by: Guest on January-29-2021

Code answers related to "how to find all combinations of lists in a list"

Python Answers by Framework

Browse Popular Code Answers by Language