[EMAIL PROTECTED] wrote: > Hi, > Suppose i have a list v which collects some numbers,how do i > remove the common elements from it ,without using the set() opeartor.
Is this a test? Why don't you want to use the set operator? Anyway, you can just move things from one list into another excluding those which are already moved: <code> numbers = [1, 2, 3, 3, 4, 4, 5] unique_numbers = [] for n in numbers: if n not in unique_numbers: unique_numbers.append (n) print unique_numbers </code> It won't be the fastest thing you could do, but it does work. Using a dictionary would speed things up, but then you're basically implementing a set using a dictionary. TJG -- http://mail.python.org/mailman/listinfo/python-list