18

Lesson 18 of 20 ยท Lists

Lists โ€” Part 7

Store many items in a list. This is part 7 of 20.

What you'll learn

You will learn that lists store multiple values, and you access them by their index (starting at 0).

Steps

  1. 1A list holds multiple values in order. Here, items contains three fruits: apple, banana, orange.
  2. 2items[0] means 'the first item'. In coding, we count from 0! So items[0] is 'apple', items[1] is 'banana', items[2] is 'orange'.
  3. 3Lists are super useful โ€” think of a playlist (list of songs), a shopping list, or a leaderboard (list of scores).
  4. 4You can add items, remove items, and check how many items are in a list with len(). Lists grow and shrink as needed!

Key Terms

List
A collection of values in order. In Python: [a, b, c].
Index
The position of an item in a list. The first item is index 0.
len()
Returns how many items are in a list.
Python 3
Output
Loading Python... This may take a few seconds.

Your code runs only in your browser. No code is sent to any server. Stay safe and have fun learning!

๐Ÿ–จ๏ธ

Checkout complete lesson on Lists for 2nd Grade

Get the full Lists track as a printable PDF โ€” all lessons, worksheets, and answer keys.

View in Shop

Your Cart (0)

Your cart is empty

Browse our shop to find activities your kids will love

Lists โ€” Part 7 โ€” Lists | 2nd Grade Coding | LittleActivity | LittleActivity