Practice Accessing Elements from a List - 20.3 | 20. LIST – Python Data Structures | CBSE 9 AI (Artificial Intelligence)
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

Accessing Elements from a List

20.3 - Accessing Elements from a List

Enroll to start learning

You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

Access the first element from the list fruits = ['apple', 'banana', 'mango'].

💡 Hint: Remember to use index 0.

Question 2 Easy

What does fruits[-1] return if fruits = ['apple', 'banana', 'mango']?

💡 Hint: Think about the last item in the list.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What will fruits[0] return if fruits = ['apple', 'banana', 'mango']?

apple
banana
mango

💡 Hint: Look at the first position in the list.

Question 2

Is fruits[-1] equal to the last item in the list?

True
False

💡 Hint: Think about what -1 refers to.

2 more questions available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Given the list mixed = [5, 'cat', 'dog', 9.0, True], find the value at index 2 and at index -1.

💡 Hint: Use both positive and negative indices to retrieve the values.

Challenge 2 Hard

You have a list of names: names = ['Alice', 'Bob', 'Charlie', 'David']. Write an expression to print the second and third names using negative indexing.

💡 Hint: Think about how negative indexing works from the end.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.