📋 Lists and indexes
Unit 2 · Programming building blocks · 9 min
A list stores values in order: fruits = ["apple", "date", "fig"]. In most languages indexes start at 0, so fruits[0] is "apple". len(fruits) is 3. A loop can process each item.
Words in this lesson
- 列表 (liè biǎo) — list
- 索引 (suǒ yǐn) — index
Project: Put the 7 weekdays in a list and print the first and last.