collections

Source code: collections.seq

class collections.deque[T]

Properties:

maxlen
left

Magic methods:

__init__(arr: Array[T], head: int, tail: int, maxlen: int)
__init__()
__init__(maxlen: int)
__init__(it: Generator[T])
__bool__()
__len__()
__iter__()
__contains__(x: T)
__copy__()
__str__()
__getitem__(idx: int)

Methods:

appendleft(x: T)
append(x: T)
popleft()
pop()
clear()
copy()
class collections.Counter[T]

Magic methods:

__init__(elements: Generator[T])
__init__(other: Counter[T])
__init__(other: Dict[T, int])
__getitem__(key: T)
__delitem__(key: T)
__eq__(other: Counter[T])
__ne__(other: Counter[T])
__copy__()
__iadd__(other: Counter[T])
__isub__(other: Counter[T])
__iand__(other: Counter[T])
__ior__(other: Counter[T])
__pos__()
__neg__()
__add__(other: Counter[T])
__sub__(other: Counter[T])
__and__(other: Counter[T])
__or__(other: Counter[T])

Methods:

elements()
most_common(n: Optional[int] = None)
subtract(elements: Generator[T])
subtract(other: Counter[T])
subtract(other: Dict[T, int])
update(elements: Generator[T])
update(other: Counter[T])
update(other: Dict[T, int])
update()
total()
extension Dict[K,V]

Magic methods:

__init__(other: Counter[K])
collections.namedtuple()