def dedup(iterable):
    iterable = iterable[:]
    items = []
    i = 0
    for item in iterable:
        if item in items:
            del iterable[i]
        else:
            i += 1
            items += [item]
    return iterable