Skip to main content

Overview

Lists are mutable sequences of Python objects with O(1) indexing and append.

Creating Lists

Create new list with len items (initially NULL). Example:

Accessing Items

PyList_GetItem returns borrowed reference - don’t Py_DECREF!

Modifying Lists

See Also