Copyright © tutorialspoint.com

# Python List index() Method

## Description:

This method returns the lowest index in list that obj appears

## Syntax:

    list.index(obj)

## Parameters:

Here is the detail of parameters:

- obj: object to be find out.

## Return Value:

It returns index of the found object otherwise raise an exception indicating that value does not find.

## Example:

    #!/usr/bin/python

    aList = [123, 'xyz', 'zara', 'abc'];

    print "Index for xyz : ", aList.index( 'xyz' ) ;
    print "Index for xxx : ", aList.index( 'zara' ) ;

This will produce following result:

    Index for xyz :  1
    Index for xxx :  2

Copyright © tutorialspoint.com