2007/11/15, Ing. Jan Janech <[EMAIL PROTECTED]>:
> Pre milovnikov in-linerov:
>
>  >>> variations  = lambda lst: [[lst[x]]+y for x in xrange(len(lst)) for
> y in variations(lst[:x]+lst[x+1:])]+(((len(lst) == 1) and [lst]) or [])
>

nadhera! ale jen tak mimochodem, to sou permutace ;-)

honza.
_______________________________________________
Python mailing list
[email protected]
http://www.py.cz/mailman/listinfo/python

Odpovedet emailem