itertools

Standard library module View source
function count
@inline
count(start: T = 0, step: T = 1, T: type)
function cycle
@inline
cycle(iterable: Generator[T], T: type)
function repeat
@inline
repeat(object: T, times: Optional[int] = None, T: type)
function accumulate
@inline
accumulate(iterable: Generator[T], func = lambda a, b: (a + b), initial = 0, T: type)
@overload
accumulate(iterable: Generator[T], func = lambda a, b: (a + b), T: type)
class chain
@tuple
class chain
Constructors 1
__new__
@inline
__new__(*iterables)
Methods 1
from_iterable
@inline
from_iterable(iterables)
function compress
@inline
compress(data: Generator[T], selectors: Generator[B], T: type, B: type)
function dropwhile
@inline
dropwhile(predicate: CallableTrait[T, bool], iterable: Generator[T], T: type)
function filterfalse
@inline
filterfalse(predicate: CallableTrait[T, bool], iterable: Generator[T], T: type)
function groupby
@inline
groupby(iterable, key = None)
function islice
islice(iterable: Generator[T], stop: Optional[int], T: type)
@overload
islice(iterable: Generator[T], start: Optional[int], stop: Optional[int], step: Optional[int] = None, T: type)
function starmap
@inline
starmap(function, iterable)
function takewhile
@inline
takewhile(predicate: CallableTrait[T, bool], iterable: Generator[T], T: type)
function tee
tee(iterable: Generator[T], n: int = 2, T: type)
function zip_longest
@inline
zip_longest(*iterables, fillvalue)
@overload
zip_longest(*args)
function product
product(*iterables, repeat: int)
@overload
product(*iterables, repeat: Literal[int] = 1)
function combinations
combinations(pool, r: int)
@overload
combinations(pool, r: Literal[int])
function combinations_with_replacement
combinations_with_replacement(pool, r: int)
@overload
combinations_with_replacement(pool, r: Literal[int])
function permutations
permutations(pool, r = None)
@overload
permutations(pool, r: Literal[int])