Unpacking iterable to first element and tail sequence
Getting N last values from iterable using deque
Getting N largest and smallest elemstns from iterable using heapq