Removing duplicates from a list

tcc.chapman at gmail.com tcc.chapman at gmail.com
Wed Sep 14 18:59:13 EDT 2005


This works too, if speed isn't your thing..

>> a = [ 1,2,3,2,6,1,3,4,1,7,5,6,7]
>> a = dict( ( (i,None) for i in a)).keys()
a
[1, 2, 3, 4, 5, 6, 7]




More information about the Python-list mailing list