Python: Find the index of an item in a specified list
Find Index of List Item
Write a Python program to find the index of an item in a specified list.
Example - 1 :

Example - 2 :

Example - 3 :

Sample Solution:
Python Code:
Sample Output:
1
Flowchart:

For more Practice: Solve these Related Problems:
- Write a Python program to find all indices of a given element in a list.
- Write a Python program to find the index of the maximum value in a list.
- Write a Python program to find the index of the last occurrence of a specific value in a list.
- Write a Python program to find the index of an item in a sorted list using binary search.
Go to:
Previous: Write a Python program to convert a list of characters into a string.
Next: Write a Python program to flatten a shallow list.
Python Code Editor:
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.