×

python · level 1 · unit 6 · lesson 1

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

A keeps many values together in one box.

A shopping list does not need a new piece of paper for every thing you buy. One list holds them all, in order. A Python list does the same, so one variable can hold lots of values.

Write a list with square brackets [ ] and put a comma between the values. Each value in the list is called an . len() counts the items, not the letters.

Printing a list shows the brackets and commas too. Python shows text items with single quotes, like 'milk'. That is fine: single and double quotes mean the same thing.

shopping = ["bread", "milk", "eggs"]
print(shopping)
print(len(shopping))

Lists can hold numbers too, like scores = [7, 10, 4].