Lists — a row of things
P40.lists-and-tables.01 · Audience: Guest, Language professional, IT/ML learner · Prerequisites: Variables — naming things
Where next?
Later in Lists & Tables
This module unlocks
Go up a level
P40.lists-and-tables.01 · Audience: Guest, Language professional, IT/ML learner · Prerequisites: Variables — naming things
Later in Lists & Tables
This module unlocks
Go up a level
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.
["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 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.
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.
Your turn: take a short word list — count it, read its first and last item,
then alphabetise the whole list with sorted. Press
Run.
Loading exercise…
Loading your notes...