There is a list L. It contains elements of arbitrary type each. How to delete all duplicate elements in such list efficiently? ORDE
In Python
>>> L = [2, 1, 4, 3, 5, 1, 2, 1, 1, 6, 5] >>> a=[] >>> for i in L: ... if not i in a: ... a.append(i) ... >>> print a [2, 1, 4, 3, 5, 6] >>>