Skip to main content

← All terms Β· Standard library

pathlib.Path

Object-oriented filesystem paths. `Path(".").rglob("*.py")` beats `os.walk + os.path.join`.

Learn this interactively:

Open lesson lesson-126 β†’

Related β€” Standard library

collections.CounterDict subclass that counts hashable items: `Counter("hello")` β†’ `{'l': 2, ...}`.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…