Guided pathThis is part of Understand Transformers & BERTBack to the path

Lists — a row of things

P40.lists-and-tables.01 · Audience: guest, language-pro, it-ml · Prerequisites: Variables — naming things

Real LLM grading for this pageLLM grading (this page):

Alphabetising a glossary by hand is slow, and easy to get wrong. Picture the paper task: a column of words you shuffle into order. This module gives you the code shape for that column — the list — and builds up to alphabetising it in one line.

Step 1 / 3 — A row of things
ⓘ Concept: A list is an ordered row
A list is an ordered row, written in square brackets: ["pear", "apple", "cherry"]. You keep lists everywhere — a class register, a reading list, a glossary — and Python writes one the same way each time.

Why it matters — A word list, a register, a glossary — most of a language professional's material is a list. It is the container the rest of the discipline builds on.

Ask the mentor about this module

Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.

Images, PDF or text. Kept on this device only.
Keeping your files on this device

Off by default. The mentor always gets your file; this only decides whether your own copy stays here. Copies live in this browser only - they do not follow you to another device, and clearing site data removes them.

Ctrl/Cmd + Enter to send

🎓 Practice ladder

1 graded rung · ~5 min

Your turn: take a short word list — count it, read its first and last item, then alphabetise the whole list with sorted. Press Run.

Explorer rung — alphabetise a list

Loading exercise…

My notes on this module

Loading your notes...

Where next?

Lists — a row of things — TransformerLab