[Tutor] List Dup-Elim Method?

Sean 'Shaleh' Perry shaleh@valinux.com
Fri, 02 Feb 2001 10:59:46 -0800 (PST)


On 02-Feb-2001 Curtis Larsen wrote:
> Is there an easy way to eliminate duplicate elements in a list?
> (A list method I missed, maybe?)
>

no, either do:

if element not in list:
        list.append(element)

or write a function to return a list with the cruft removed.