4 lines
89 B
Python
4 lines
89 B
Python
|
|
def p(l):
|
||
|
|
if not l: return [[]]
|
||
|
|
return p(l[1:]) + [[l[0]] + x for x in p(l[1:])]
|