1. Home
  2. Data Science
  3. Python
  4. What is the time complexity of accessing a list element by…

Added 25 Nov 2026

What is the time complexity of accessing a list element by index in Python?

  1. O(1) Correct answer
  2. O(n)
  3. O(log n)
  4. O(n log n)

Correct answer

A. O(1)

12 views

MCQSEXAM

Explanation

Lists are backed by arrays, so index access takes constant time.

Reference

Asked in: Python Interview Lists

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

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? 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