Re: subset permutations

2005-12-11 Thread Anton Vredegoor
Steven D'Aprano wrote: > On Fri, 09 Dec 2005 16:03:46 +1100, Ben Finney wrote: > > >> Do you want the result to be: > >> AB, AC, AD, BC, BD, CD > > > > That is the complete set of combinations of the letters. > > > >> Or, do you want AB,BA,AC,CA,AD,DA,BC,CB,BD,DB,CD,DB ? > > > > That is the comple

Re: subset permutations

2005-12-10 Thread Gerard Flanagan
Jay Parlar wrote: > On Dec 8, 2005, at 5:29 PM, [EMAIL PROTECTED] wrote: > > > > Hello all, > > > > I'm a beginner with programming. Trying to teach myself with that > > excellent rat book. Unfortunately I just can't seem to figure out a > > simple problem that has come up at my work (biology lab)

Re: subset permutations

2005-12-09 Thread Steven D'Aprano
On Fri, 09 Dec 2005 16:03:46 +1100, Ben Finney wrote: >> Do you want the result to be: >> AB, AC, AD, BC, BD, CD > > That is the complete set of combinations of the letters. > >> Or, do you want AB,BA,AC,CA,AD,DA,BC,CB,BD,DB,CD,DB ? > > That is the complete set of permutations of the letters.

Re: subset permutations

2005-12-08 Thread Ben Finney
Jay Parlar <[EMAIL PROTECTED]> wrote: > For instance, say you have the list ['A','B',C','D'], and you want > all possible TWO letter permutations. $ dict permutation From The Collaborative International Dictionary of English v.0.48 [gcide]: Permutation \Per`mu*ta"tion\ (p[~e]r`m[-u

Re: subset permutations

2005-12-08 Thread Rick Wotnaz
Jay Parlar <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > http://www.bigbold.com/snippets/posts/show/753 A string is also iterable, so whether s is the string (as shown) or list('ACDEFGHIKLMNPQRSTVWY'), as you have it above, this should generate the 16 permutations, as a list of 4-

Re: subset permutations

2005-12-08 Thread Jay Parlar
On Dec 8, 2005, at 5:29 PM, [EMAIL PROTECTED] wrote: > > Hello all, >   > I'm a beginner with programming. Trying to teach myself with that > excellent rat book. Unfortunately I just can't seem to figure out a > simple problem that has come up at my work (biology lab): > let's say I have a lis

subset permutations

2005-12-08 Thread me you
Hello all,   I'm a beginner with programming. Trying to teach myself with that excellent rat book. Unfortunately I just can't seem to figure out a simple problem that has come up at my work (biology lab): let's say I have a list ['A','C','D','E','F','G','H','I','K','L','M','N','P','Q','R','S','T','