All Modules
Chapter 02 • 03

Functional Programming, Itertools & Collections

12 Lessons • Hands-on practice

01

Grouping Data with `itertools.groupby`

Start
02

`collections.defaultdict`: Eliminating `KeyError`

Start
03

`collections.Counter`: Instant Frequency Maps

Start
04

`collections.deque`: $O(1)$ Double-Ended Queues

Start
05

`collections.namedtuple`: Lightweight Typed Tuples

Start
06

`functools.partial`: Freezing Function Arguments

Start
07

First-Class Functions: Passing Functions as Data

Start
08

Nested Functions & the nonlocal Keyword

Start
09

Function Closures: Retaining Enclosed State

Start
10

The Decorator Pattern: Wrapping Callables

Start
11

Preserving Metadata with @functools.wraps

Start
12

Decorators That Accept Arguments

Start