All notes, in reading order

968 published notes across every category.

Python

Scope and the LEGB Rule

Python resolves a name by looking in four places in a fixed order: local, enclosing, global, built-in. Assignment anywhere in a function makes the nam...

Read more
Python

Lambda Functions

A lambda is a small anonymous function written as a single expression. It exists for the places where naming a function would add nothing.

Read more
Python

Recursion: How It Works

A recursive function calls itself on a smaller version of the problem until it reaches a case it can answer directly. Every one needs a base case and...

Read more