Skip to main content

itertools

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