Accessing elements (indexing, first, last)
📖 Scenario: You are helping a small bookstore organize a list of book titles. You want to practice how to get specific books from the list by their position.
🎯 Goal: Learn how to access elements in a list by using index numbers, and how to get the first and last items easily.
📋 What You'll Learn
Create a list of book titles with exact names
Create a variable to hold the index number to access
Use the index to get the correct book from the list
Print the first book, the book at the index, and the last book
💡 Why This Matters
🌍 Real World
Accessing elements by position is common when working with lists of items like books, songs, or products.
💼 Career
Knowing how to get specific data from lists is a basic skill for programming jobs that handle collections of information.
Progress0 / 4 steps