W3Schools
w3schools.com โบ python โบ ref_string_index.asp
Python String index() Method
Python Examples Python Compiler ... Interview Q&A Python Bootcamp Python Training ... The index() method finds the first occurrence of the specified value....
W3Schools
w3schools.com โบ python โบ ref_list_index.asp
Python List index() Method
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
Videos
13:07
How to Find the Index of an Element in a List in Python? - YouTube
08:11
How to use the INDEX Function in Python! - YouTube
01:25
How to Find the Index of a Python List Item? - YouTube
02:58
Python 3.7: Index() List Method In Python - YouTube
02:45
Python Tutorial: How To Use The List Index Method in Python - YouTube
11:00
Python index() List Method - TUTORIAL - YouTube
W3Schools
w3schools.com โบ python โบ ref_tuple_index.asp
Python Tuple index() Method
The index() method finds the first occurrence of the specified value. The index() method raises an exception if the value is not found. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: ...
Programiz
programiz.com โบ python-programming โบ methods โบ list โบ index
Python List index()
The index() method returns the index of the specified element in the list.
GeeksforGeeks
geeksforgeeks.org โบ python-list-index
Python List index() - Find Index of Item - GeeksforGeeks
index() method in Python is a helpful tool when you want to find the position of a specific item in a list. It works by searching through the list from the beginning and returning the index (position) of the first occurrence of the element you're ...
Published ย April 27, 2025
DataCamp
datacamp.com โบ tutorial โบ python-list-index
Python List index() Method Explained with Examples | DataCamp
March 28, 2025 - This function is especially useful ... Master Python for data science and gain in-demand skills. ... The method index() returns the lowest index in the list where the element searched for appears....
Reddit
reddit.com โบ r/learnpython โบ w3schools lists tutorials; half of the functions they use don't seem to work?
r/learnpython on Reddit: w3schools lists tutorials; half of the functions they use don't seem to work?
October 2, 2023 -
Total newbie here. Just been doing some basic exercises and I think the site I'm using is missing some advice, but its such a basic problem I've had no luck googling.
https://www.w3schools.com/python/python_lists.asp
Here they have a list of functions for working with lists; "index()"; "count()"; etc. and implies that these are "built in". However my Python install (3.11.5) doesn't have them as core. I assume I just need to import a module but w3 doesn't tell me which module to import.
Am I right? If so which module is it? I assume its really basic common knowledge.
Thanks x
Top answer 1 of 2
4
The index(), count() and other "functions" you mention aren't standalone functions, they are methods of lists. That means you apply them to the list, like this: test = [1, 2, 3, 4, 5, 6] print(test.index(3)) # print index in list of the element of value 3 The list methods are described in the documentation .
2 of 2
1
Can you mention explicitly what you've done and how Python reacts? I have 3.11.5, and the builtin list functions you've mentioned work just fine. >>> b = ['apple', 'banana', 'apple', 'cherry'] >>> b.count('apple') 2 >>> b.index('banana') 1
Codecademy
codecademy.com โบ docs โบ python โบ lists โบ .index()
Python | Lists | .index() | Codecademy
June 11, 2025 - The .index() method is a built-in Python list method that returns the index position of the first occurrence of a specified element within a list.
iO Flood
ioflood.com โบ blog โบ index-python
index() Python Function Guide (With Examples)
February 10, 2024 - In this example, we have a list my_list containing three items. We use the index() function to find the position of โbananaโ in the list. The function returns โ1โ, which is the index position of โbananaโ. Remember, Python list indexing starts from 0.
Python Academy
python-academy.org โบ functions โบ index
index โ Python Function Reference
A comprehensive guide to Python functions, with examples. Find out how the index function works in Python. Return zero-based index in the list of the first item whose value is equal to x.
Du
cs.du.edu โบ ~intropython โบ intro-to-programming โบ list_methods.html
List methods - Introduction to Programming
The call your_list.index(x) searches for the value x in your_list. It then returns an int which is the index of the first time that value appears in the list. One down side of the index() method is that x must be in the list - if it isn't then a ValueError results.
Upgrad
upgrad.com โบ home โบ tutorials โบ software & tech โบ index in python
Index Function in Python: Complete Guide
April 22, 2026 - Learn how to use index function in Python with examples covering list indexing, finding elements, negative indexing, and slicing.
Simplilearn
simplilearn.com โบ home โบ resources โบ software development โบ python index: mastering list indexing techniques
Python List index() Method Explained with Examples
3 weeks ago - The Python index() method helps you find the index position of an element or an item in a string of characters or a list of items.
Address ย 5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
Hyperskill
hyperskill.org โบ university โบ python โบ indexes-and-index-in-python
Indexes and index() in Python
July 17, 2024 - For example, by slicing the list ... function on the sliced list until the element is not found anymore. In Python, an index refers to the position of an element within a list or a string....
Tutorialspoint
tutorialspoint.com โบ python โบ list_index.htm
Python List index() Method
The Python List index() method is used to retrieve the lowest index in a list at which a specified object appears. The object can be anything; a single element or a collection of elements in the form of another list, tuple, set etc.
Educative
educative.io โบ answers โบ what-is-index-in-python
What is index() in Python?
index() is a list method in Python that returns the index of a specified element in a list. The syntax of this function is as follows.