Advance the iterator n-steps ahead. If n is
None, consume entirely.
Any iterator from which to consume the items.
Number of items to consume from the iterator. If
Noneconsume it entirely.
>>> from iteration_utilities import consume >>> g = (x**2 for x in range(10)) >>> consume(g, 2) >>> list(g) [4, 9, 16, 25, 36, 49, 64, 81]
>>> g = (x**2 for x in range(10)) >>> consume(g, None) >>> list(g)