A permutation on permutations

Arthur Siegel ajs at ix.netcom.com
Sun Nov 25 00:54:38 EST 2001


>> I am feeding control points to a curve function, and
>> want all permutations that result in unique curves.
> >For this purpose a sequence is duplicative
> >of its reverse, i.e. [1,2,3,4] == [4,3,2,1], etc.
>> 

Tyler asks:
>Would [1,3,2,4] be a duplicate?

Nope. 

BTW, I just gave an example of a list of length 4.  The  class
itself can accept a list of arbitrary length as an argument.

True enough, I am not fully confident that I have a full handle
on what will create duplicate curves in all cases.  

But I believe I am correct that for the function as
written only list == list.reverse() will create duplicate curves.

Art  





More information about the Python-list mailing list