On 18 Mar, 10:57, Simon Forman <[EMAIL PROTECTED]> wrote: > def f(L): > '''Return a set of the items that occur more than once in L.''' > L = list(L) > for item in set(L): > L.remove(item) > return set(L)
def nonunique(lst): slst = sorted(lst) return list(set([s[0] for s in filter(lambda t : not(t[0]-t[1]), zip(slst[:-1],slst[1:]))])) -- http://mail.python.org/mailman/listinfo/python-list