ramon aragues wrote: > if new_int not in long_list: > long_list.append(new_int) > but it is extremely slow... is there a faster way of doing this in python? >>> import sets >>> int_set = sets.Set() >>> for i in [1,2,2,3,4,4,4]: ... int_set.add(i) ... >>> int_set Set([1, 2, 3, 4]) >>> This requires Python 2.3. Peter