def dedupe(it):
    seen = set()
    for el in it:
        if el in seen:
            continue
        seen.add(el)
        yield el
>>> list(dedupe([3,1,3,1,2]))
dataset/ETHPy150Open scrapinghub/splash/splash/utils.py/dedupe