5 lines
149 B
Python
5 lines
149 B
Python
|
|
def comb(m, lst):
|
||
|
|
if m == 0: return [[]]
|
||
|
|
return [[x] + suffix for i, x in enumerate(lst)
|
||
|
|
for suffix in comb(m - 1, lst[i + 1:])]
|