I have a question about itertools.islice(stream,k) function. In python book 5.13 (sampling online data), heaps bootcamp, and 10.3 (sort an almost-sorted array), the book uses itertools.islice to a sequence (or stream). After this operation, the solution uses “for x in sequence” to fetch remaining elements of the sequence (or stream).
As far as I searched, the itertools.islice(stream,k) function does not delete any element of an iterator. How come that you can fetch “remaining elements” but not “from the very beginning” of the sequence after using islice function?