Lists
Lesson 13 of 20 · Py.Micro
An ordered collection you can index, change and grow.
drinks[0] is the first item and drinks[-1] the last. len() gives the size. Asking for a position that does not exist is an IndexError.
Check yourself
In ["a", "b", "c"], what is item [1]?
Do it in the browser: a real Python tool, a short mission and instant feedback. No install.
Start this lesson — free