tail¶
- iteration_utilities.tail(iterable, n)¶
Return an iterator over the last n items.
- Parameters:
- iterableiterable
The iterable from which to take the last items.
- n
int
How many elements.
- Returns:
- iteratoriterator
The last n items of iterable as iterator.
Examples
>>> from iteration_utilities import tail >>> list(tail('ABCDEFG', 3)) ['E', 'F', 'G']