Question:

____ is raised when the index in a sequence is out of range.

Show Hint

Accessing a non-existent element in a sequence? Think `IndexError`!
Updated On: Apr 28, 2025
  • ImportError
  • IndexError
  • TypeError
  • EOFError
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

`IndexError` is raised in Python when you try to access an index that is outside the bounds of a list, tuple, or string. The other options relate to different kinds of errors (e.g., import issues, type mismatches, or unexpected end-of-file).
Was this answer helpful?
0
0