RosettaCodeData/Task/Combinations/Python/combinations-3.py

3 lines
133 B
Python
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
>>> comb(3, range(5))
[[0, 1, 2], [0, 1, 3], [0, 1, 4], [0, 2, 3], [0, 2, 4], [0, 3, 4], [1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]]