In this lesson
- It starts with a question. prices = [4, 7, 9]. What is prices[0] in Python?
- The idea you will find. A list and a loop are made for each other. — The loop does not need to know the length. Add a fourth price and the same code handles it. That is why lists are the workhorse of data handling, and why off-by-one errors — forgetting the count starts at zero — are the classic trap.
- Length. 5 short steps. Progress saves on this phone.
Part of Reading Python
Reading and predicting Python a line at a time, before writing any of your own.