Re: after sorted from the lists

2005-11-22 Thread Ben Bush
On 11/22/05, Ben Bush <[EMAIL PROTECTED]> wrote: > On 11/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >>> ll = [[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]] > > >>> ls = [frozenset(i) for i in ll] > > >>> ss = set(ls) > > >>> ss > > set([frozenset([1, 3]), frozenset([1, 2]), frozenset([1, 4]),

Re: after sorted from the lists

2005-11-22 Thread Ben Bush
On 11/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >>> ll = [[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]] > >>> ls = [frozenset(i) for i in ll] > >>> ss = set(ls) > >>> ss > set([frozenset([1, 3]), frozenset([1, 2]), frozenset([1, 4]), frozenset([3])]) > >>> [list(i) for i in ss] > [[1, 3], [1, 2]

Re: after sorted from the lists

2005-11-22 Thread Ben Bush
On 11/22/05, Ben Bush <[EMAIL PROTECTED]> wrote: > I have a list: > [[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]] > How to remove all the duplicate or same after sorted from the lists? > That is, [1,2] and [2,1] are the same after sorting them. > I want the result to be: > [[1,

Re: after sorted from the lists

2005-11-22 Thread jepler
>>> ll = [[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]] >>> ls = [frozenset(i) for i in ll] >>> ss = set(ls) >>> ss set([frozenset([1, 3]), frozenset([1, 2]), frozenset([1, 4]), frozenset([3])]) >>> [list(i) for i in ss] [[1, 3], [1, 2], [1, 4], [3]] pgphz7iINDVUi.pgp Description: PGP signature -- http:/

Re: after sorted from the lists

2005-11-22 Thread Micah Elliott
On Nov 22, Ben Bush wrote: > I have a list: > [[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]] > How to remove all the duplicate or same after sorted from the lists? > That is, [1,2] and [2,1] are the same after sorting them. > I want the result to be: > [[1,2],[3,1],[1,4],[3,3]] You

after sorted from the lists

2005-11-22 Thread Ben Bush
I have a list: [[1,2],[2,1],[3,1],[1,4],[3,3],[1,4]] How to remove all the duplicate or same after sorted from the lists? That is, [1,2] and [2,1] are the same after sorting them. I want the result to be: [[1,2],[3,1],[1,4],[3,3]] -- http://mail.python.org/mailman/listinfo/python-list