itertools

..
Basic

Basic iterables.

ChainIterator

An iterator that chains two iterators one after the other.

CountIterator

An iterator that counts up integers.

EmptyIterator

A simple empty iterator that returns nothing.

EnumerateIterator

An iterator that includes the index for each element.

Extensions

Extension functions to provide a fluent iterator API. Use with:

FilterIterator

An iterator that keeps elements based on a predicate.

FlattenIterator

An iterator that flattens an iterator of iterators.

FuncIterable

An iterable based on a function to create the iterator.

GroupByIterator

An iterator that groups elements by a key.

Grouping

A single grouping.

Indexed

A pair of index and element.

IteratorException

The exception thrown when something fatal happens during iteration.

MapIterator

An iterator that transforms each element with a given function.

OnceIterable

An iterable that can only be used once.

Pair

A pair of zipped elements.

RepeatIterator

An iterator that repeats a single element infinitely.

ReverseIterator

An iterator that goes in reverse order.

ScanlIterator

An iterator that applies a reduction each step, accumulating the results.

SkipIterator

An iterator that skips the first n elements.

SkipWhileIterator

An iterator that skips elements as long as a predicate is true.

TakeIterator

An iterator that takes the first n elements.

TakeWhileIterator

An iterator that takes elements as long as a predicate is true.

ZipIterator

An iterator making a pair iterator from two other iterators.