Re: Unyeilding a permutation generator

2008-11-04 Thread sillyhat
On 2 Nov, 22:03, Carsten Haese <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Anyway what I want to do is experiment with code similar to this (i.e. > > same algorithm and keep the recursion) in other languages, > > particularly vbscript and wondered what it would look like if it was > >

Re: Unyeilding a permutation generator

2008-11-03 Thread sillyhat
On Nov 3, 4:24 pm, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Nov 2, 10:34 pm, [EMAIL PROTECTED] wrote: > > > Anyway what I want to do is experiment with code similar to this (i.e. > > same algorithm and keep the recursion) in other languages, > > particularly vbscript and wondered what it w

Unyeilding a permutation generator

2008-11-02 Thread sillyhat
Hello, can someone please help. I found the following code at http://code.activestate.com/recipes/252178/ def all_perms(str): if len(str) <=1: yield str else: for perm in all_perms(str[1:]): for i in range(len(perm)+1): #nb str[0:1] works in bot