Answers for "how to find combinations of numbers in python"

2

python get all combinations of list

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

counting combinations python

# Counting combinations
# nCk = n! / (k!(n-k)!)
from math import comb
>>> comb(10,3)
120
Posted by: Guest on September-30-2021

Code answers related to "how to find combinations of numbers in python"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language