On Thu, 2006-11-30 at 12:51 -0800, Chris Hengge wrote:
> Anyone point me to something more efficient then 
> 
list2 = list(set(list1))

Older Pythons will force you to import sets and use sets.Set

> for item in list1:
>      if item not in list2:
>            list2.append()
> 
> This just seems to take a bit a time when there are thousands or
> dozens of thousands of records just to filter out the dozen or so
> copies.. 
> 
> Thanks.
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
-- 
Lloyd Kvam
Venix Corp

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to