Concept

What is a list in Python?

A list is an ordered box that holds many values at once — and unlike a tuple, you can change what's inside it after it's created. Below is a real widget from epochai's own curriculum, not a screenshot.

Where a variable holds one value, a list holds many, in order, under one name. Write scores = [10, 20, 30] and you've made a box containing three slots, numbered starting at 0 — so scores[0] is 10, not 1. That off-by-one detail trips up almost everyone at first; it's worth memorizing early rather than re-deriving it every time.

Lists are mutable — you can change them after creation without making a new one. scores.append(40) adds a value to the end; scores.pop() removes and returns the last one; scores.pop(0) removes a specific index instead. Each of these changes the same list object in place, which is exactly what makes a list different from a tuple, its unchangeable cousin.

Negative indexing is the other habit worth building now: scores[-1] means "the last item," counting backward from the end instead of forward from the start. It reads oddly the first time and becomes second nature almost immediately after.

Watch it happen

The same interactive widget epochai's own lessons use — live, not a recording.

Playing automatically. Every epochai lesson also has an Explore mode where you drive it yourself.

This is one line out of 49 free lessons

Module 1 — Programming Fundamentals — covers variables, control flow, loops, functions, and debugging. Free, no card required.