Is there a unique method in python to unique a list?

Donald Stufft donald.stufft at gmail.com
Sun Sep 9 01:47:40 EDT 2012


If you don't need to retain order you can just use a set, 

set([1, 1, 2, 3, 4]) = set([1, 2, 3, 4])

But set's don't retain order. 


On Sunday, September 9, 2012 at 1:43 AM, Token Type wrote:

> Is there a unique method in python to unique a list? thanks
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120909/0432c076/attachment.html>


More information about the Python-list mailing list