dreamcode
Back to map
Lists · Lesson 5 of 6
+15 XP on finish
PYTHON BASICS

Lists of things

A list keeps multiple values together. Write square brackets with commas in between. Access individual items with square brackets and their index (position), starting at 0.

How it reads
`["wispy", "puffy"]` creates a list with two text items.
`clouds[1]` looks up the item at position 1 (the second item).
`len(clouds)` counts the total items in the list, here 2.
Cloud tip: Indexes start at 0. So the first item is `clouds[0]`, and the second is `clouds[1]`.
main.py
PYTHON
real Python, runs in your browser
CONSOLE
- run your code to see output -