← All terms · Standard library
collections.Counter
Dict subclass that counts hashable items: `Counter("hello")` → `{'l': 2, ...}`.
Learn this interactively:
Open lesson lesson-128 →Related — Standard library
pathlib.PathObject-oriented filesystem paths. `Path(".").rglob("*.py")` beats `os.walk + os.…itertoolsIterator building blocks — `chain`, `groupby`, `combinations`, `accumulate`. Laz…functools.cacheMemoize a pure function with `@functools.cache`. Replaces hand-rolled dict cachi…dataclasses.fieldConfigure a dataclass attribute — mutable defaults, init/repr behavior. Use `fie…