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
- What Is a List?
- Getting Items by Position
- Adding and Removing Items
- Looping Through a List