If n is negative drop them from the end of the sequence instead. Which is
effectively the same as take(length - n) if you know the length of the
iterator.
Note: because the length of the iterator is not known—if you use negative
index the entire iterator has to be consumed before yielding the first item.
This can result in an infinite loop if the iterator is indefinite.
Drop the first n items from the iterator and continue from there.
If
nis negative drop them from the end of the sequence instead. Which is effectively the same astake(length - n)if you know the length of the iterator.Note: because the length of the iterator is not known—if you use negative index the entire iterator has to be consumed before yielding the first item. This can result in an infinite loop if the iterator is indefinite.
See also: