It's O(n), also check out: http://wiki.python.org/moin/TimeComplexity

This page documents the time-complexity (aka "Big O" or "Big Oh") of various operations in current CPython. Other Python implementations (or older or still-under development versions of CPython) may have slightly different performance characteristics. However, it is generally safe to assume that they are not slower by more than a factor of O(log n)...

Answer from Zach Kelling on Stack Overflow
🌐
Finxter
blog.finxter.com › home › learn python blog › python list index() – a simple illustrated guide
Python List index() - A Simple Illustrated Guide - Be on the Right Side of Change
June 19, 2021 - For n elements, the runtime complexity is O(n) because in the worst-case you need to iterate over each element in the list to find that the element does not appear in it. Let’s check the runtime complexity practically for different list sizes ...
Discussions

python - what is the time complexity of list.index(obj) method? - Stack Overflow
This page documents the time-complexity (aka "Big O" or "Big Oh") of various operations in current CPython. Other Python implementations (or older or still-under development versions of CPython) may have slightly different performance characteristics. More on stackoverflow.com
🌐 stackoverflow.com
Does pop(i) have a Time Complexity of O(n) or O(k)?
I'm reading a book on data structures and algorithms in python and the say pop(i) is O(n) but on Python's website it states that pop intermediate is… More on reddit.com
🌐 r/learnpython
3
3
July 1, 2020
python - Improving the time complexity of a function that returns the index of the first occurrence of an element in a list - Stack Overflow
UPDATE 1 (Oct.16): The original code had a few logic errors which were rectified. The updated code below should now produce the correct output for all lists L, S.T they meet the criteria for a spec... More on stackoverflow.com
🌐 stackoverflow.com
algorithm - python str.index time complexity - Stack Overflow
Does this mean we should implement ... builtin index() for time critical processes ? 2016-04-26T15:11:15.09Z+00:00 ... I think that thread has a good answer about that topic: programmers.stackexchange.com/questions/183725/… 2016-04-26T15:25:13.243Z+00:00 ... Save this answer. ... Show activity on this post. its a combination of a few algorithms- look at this · Python string 'in' operator implementation algorithm and time complexity... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Analytics Vidhya
analyticsvidhya.com › home › how can i manipulate python list elements using indexing?
How can I Manipulate Python List Elements Using Indexing?
January 22, 2024 - Direct indexing has a time complexity of O(1), while using the index() method for searching has a time complexity of O(n).
🌐
MaxInterview
maxinterview.com › code › python-list-index-time-complexity-861AB07EBF8704C
MaxInterview - python list index time complexity
April 4, 2022 - 1lst = ["Alice","Bob","Duckie"... index function returns where the value given is in the string. 5The time complexity is O(n), as the worst case scenario requires iterating 6over n elements to find the desired result.
🌐
Quora
quora.com › How-do-Python-lists-maintain-constant-time-complexity-for-indexing-if-their-elements-can-be-of-more-than-one-type
How do Python lists maintain constant time complexity for indexing if their elements can be of more than one type? - Quora
Answer (1 of 4): in a C arrays where the data is held in contiguous memory, you are right that indexing couldn’t be constant time in a heterogeneous container as you would have to sum the widths of all of the previous items before being able to fetch an item (or you would need to keep a separate ...
🌐
DEV Community
dev.to › williams-37 › understanding-time-complexity-in-python-functions-5ehi
Understanding Time Complexity in Python Functions - DEV Community
October 25, 2024 - Time complexity is a computational concept that describes the amount of time an algorithm takes to complete as a function of the length of the input. It is usually expressed using Big O notation, which classifies algorithms according to their ...
🌐
Medium
medium.com › @ivanmarkeyev › understanding-python-list-operations-a-big-o-complexity-guide-49be9c00afb4
Understanding Python List Operations: A Big O Complexity Guide | by Ivan Markeev | Medium
June 4, 2023 - In this article, we will explore the Big O complexity of common list operations, helping you make informed decisions about algorithm design and performance optimizations. Accessing an element in a Python list by its index is an efficient operation with constant time complexity.
Find elsewhere
🌐
Apps Developer Blog
appsdeveloperblog.com › home › python › python list index()
Python List index() - Apps Developer Blog
January 27, 2023 - The index function finds the match by checking every element of the list until the match is found. Thus, for a smaller list, this is a good choice. But if you are dealing with huge lists and you are not sure whether the match will be found or not, then this function is not. This will increase the time cost of your code. So the longer the list, the more amount of time it will take. To avoid the time complexity, you can narrow down the search by giving the start and end parameters.
🌐
AlgoCademy
algocademy.com › link
Time Complexity Guidelines in Python | AlgoCademy
The code is straightforward and leverages Python's ability to access list elements in constant time. The time complexity of the optimized solution is O(1) because accessing an element by its index in a list is a constant time operation.
🌐
Reddit
reddit.com › r/learnpython › does pop(i) have a time complexity of o(n) or o(k)?
r/learnpython on Reddit: Does pop(i) have a Time Complexity of O(n) or O(k)?
July 1, 2020 - Share ... O(k) when k = n-1 is really the same as O(n) where time complexity is concerned. ... The time complexity depends not on n, but on the index value to list.pop(), which is possibly a function of n, or not.
🌐
Python
wiki.python.org › moin › TimeComplexity
TimeComplexity - Python Wiki
This page documents the time-complexity (aka "Big O" or "Big Oh") of various operations in current CPython. Other Python implementations (or older or still-under development versions of CPython) may have slightly different performance characteristics.
🌐
Shiksha
shiksha.com › home › it & software › colleges in india
Best IT & Software Colleges in India - Courses, Fees, Admissions 2026, Cutoff, Placements
December 16, 2024 - Find 12571 best IT & Software Colleges in India. Compare Fees, IT & Software Courses, Admission Process, Accepted Exams, Cut off, Placements, and Student Reviews.
🌐
GeeksforGeeks
geeksforgeeks.org › python › complexity-cheat-sheet-for-python-operations
Complexity Cheat Sheet for Python Operations - GeeksforGeeks
July 12, 2025 - Python built-in data structures like lists, sets, and dictionaries provide a large number of operations making it easier to write concise code However, not understanding the complexity of these operations can sometimes cause your programs to run slower than expected.
🌐
UCI
ics.uci.edu › ~pattis › ICS-33 › lectures › complexitypython.txt
The Complexity of Python Operators/Functions
The average list slice taken in ... O(1) - always executed in worst case; use The complexity class for executing the entire function is O(N)*O(N)*O(1) + O(1) = O(N**2). So we know from the previous lecture that if we double the length of alist, this function takes 4 times ...
🌐
Calmops
calmops.com › home › "python" › "python performance: list.index() and faster lookup alternatives"
Python Performance: list.index() and Faster Lookup Alternatives - Calmops | Tech, Business & Indie Hacker Knowledge Base
May 8, 2026 - See Python Guide for more context. ... 'rabbit', 'horse'] index = animals.index('dog') print(index) # => 1 · Time complexity: O(n) — in the worst case, it checks every element....
🌐
Bradfield CS
bradfieldcs.com › algos › analysis › performance-of-python-types
Performance of Python Types
In Python lists, values are assigned to and retrieved from specific, known memory locations. No matter how large the list is, index lookup and assignment take a constant amount of time and are thus