Skip to content

Get list index of a list item in Python

If you want to find the index of an list element, you can use the list.index() method:

[sc name=”src” url=”https://stackoverflow.com/questions/176918/finding-the-index-of-an-item-given-a-list-containing-it-in-python” ]

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.