def split_at(n, seq):
    """Lazily splits the sequence at given position,
       returning a pair of iterators over its start and tail."""
    a, b = tee(seq)
    return islice(a, n), islice(b, n, None)
Lazily splits the sequence at given position,
       returning a pair of iterators over its start and tail.
funcy/seqs.py