lisa.utils.take#

lisa.utils.take(n, iterable)[source]#

Yield the first n items of an iterator, if n positive, or last items otherwise.

Yield nothing if the iterator is empty.