1. Home
  2. Data Science
  3. Python
  4. What exception is raised when you access a list index that…

Added 25 Nov 2026

What exception is raised when you access a list index that does not exist in Python?

  1. KeyError
  2. ValueError
  3. IndexError Correct answer
  4. RangeError

Correct answer

C. IndexError

5 views

MCQSEXAM

Explanation

Out-of-range sequence indexing raises IndexError.

Reference

Asked in: Python Interview Exception Handling

https://docs.python.org/3/tutorial/errors.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs