0Pricing
Coding for Kids · Lesson

Getting Items by Position

Pick items using their index.

Finding One Item 🔍

Hello, treasure hunter! 🗺️ A list has many items. But how do we grab just ONE? We use its position (called an index)! 🎯

Counting from Zero 0️⃣

Surprise! Lists count positions starting from 0, not 1! The first item is at position 0. 🤓

fruits = ["apple", "banana", "cherry"]
print(fruits[0])

All lessons in this course

  1. What Is a List?
  2. Getting Items by Position
  3. Adding and Removing Items
  4. Looping Through a List
← Back to Coding for Kids