May-11-2019, 05:43 AM
Assuming that objective is to dedupe hashable objects in iterable while maintaining order:
def dedupe(iterable): seen = set() for item in iterable: if item not in seen: yield item seen.add(item)
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.