← the wiki

List

One variable that holds many values in order — item 0, item 1, item 2…

A list is a row of boxes under one name: scores = [90, 75, 88]. Each item sits at a numbered position — its index — and counting starts at 0, so scores[0] is 90. You can add items, remove them, and loop over the whole row in one line.

Lists are the first data structure every programmer meets, and the most used: a playlist, a to-do list, the messages in a chat — all lists.

The best way to make it stick: watch it run. Start an interactive lesson →