Skip to content
AITroveRead. Build. Understand.

Data Types & Collections

Operation contracts, checked Python programs and connected learning resources.

Python programs operate on objects with explicit input, ownership and failure contracts.

Learning roadmap

This section contains 31 written lessons or quiz banks. Programs are verified on CPython 3.14.6. Standard-library lessons target 3.11+ syntax; lessons using data, web, machine-learning or testing packages state their tested dependencies separately. Framework programs use local test clients, not a deployed service. Read the stated limits before adapting a fixture into an application.

Sequence and key ownership

Read the contract, run its program and inspect the failure case.

Text and numeric representation

Read the contract, run its program and inspect the failure case.

Copies, text and rolling collections

Read the contract, run its program and inspect the failure case.

Buffer and key contracts

Read the contract, run its program and inspect the failure case.

Factories, record shapes and sorted positions

Read the contract, run its program and inspect the failure case.

Numeric buffers, explicit order and iterator composition

Read the contract, run its program and inspect the failure case.

Layered settings and wire bytes

Read the contract, run its program and inspect the failure case.

Exact ratios, aliases and local-clock ambiguity

Read the contract, run its program and inspect the failure case.

Mapping views and snapshots

Read the contract, run its program and inspect the failure case.

Mutable bytes and snapshots

Read the contract, run its program and inspect the failure case.

Mapping alias ownership

Read the contract, run its program and inspect the failure case.

Text and numeric import boundaries

Read the contract, run its program and inspect the failure case.

Continue learning

Move between tutorial, collections, advanced material and practice using the subject tabs. The sidebar changes with each section; related examples keep one canonical lesson URL.

Curriculum

Read the contract, run its program and inspect the failure case.

  1. 1Python dictionary views: iteration sees a live mapping, not a snapshot

Read the contract, run its program and inspect the failure case.

  1. 1Python bytearray: mutable bytes share storage only through explicit views

Read the contract, run its program and inspect the failure case.

  1. 1Python dict.setdefault: the returned collection remains mutable shared state
Storage details