Answers for "python possibilities in list no repetition"

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 "python possibilities in list no repetition"

Python Answers by Framework

Browse Popular Code Answers by Language