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 / 3A 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.

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…

Where next?