def iter_repl(seq, subseq, repl):
    """
    Replace sub-list `subseq` in `seq` with `repl`.
    """
    seq, subseq, repl = list(seq), list(subseq), list(repl)
    subseq_len = len(subseq)
    rem = seq[:]
    while rem:
        if rem[:subseq_len] == subseq:
            for c in repl:
                yield c
            rem = rem[subseq_len:]
        else:
            yield rem.pop(0)
