Answers for "combination without repetition python"

2

combination without repetition python

import itertools as it
list(it.combinations([1,2,3,4,5], 4))
#[(1, 2, 3, 4), (1, 2, 3, 5), (1, 2, 4, 5), (1, 3, 4, 5), (2, 3, 4, 5)]
Posted by: Guest on March-11-2020
0

combination without repetition python

>>> import itertools as it
>>> list(it.combinations([1,2,3,4,5], 4))
[(1, 2, 3, 4), (1, 2, 3, 5), (1, 2, 4, 5), (1, 3, 4, 5), (2, 3, 4, 5)]
Posted by: Guest on March-11-2020

Code answers related to "combination without repetition python"

Python Answers by Framework

Browse Popular Code Answers by Language