Re: a good algo to do this

2006-03-06 Thread Gerard Flanagan
Gerard Flanagan wrote: > [EMAIL PROTECTED] wrote: > > hi > > i need to do something like this > > eg given a number (as a string) = "123" > > there are a few combination i want to find with this string, ie > > "132","321","231","312" and "213". so there are 6 combinations > > altogether. i remember

Re: a good algo to do this

2006-03-06 Thread Gerard Flanagan
[EMAIL PROTECTED] wrote: > hi > i need to do something like this > eg given a number (as a string) = "123" > there are a few combination i want to find with this string, ie > "132","321","231","312" and "213". so there are 6 combinations > altogether. i remember there's a formula for this, but for

Re: a good algo to do this

2006-03-06 Thread drochom
hi, try this: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465 cheers. -- http://mail.python.org/mailman/listinfo/python-list