vincenzo@earth:~$ python Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> a = [1, 2, 3] >>> a.index(2) 1 >>> class test: ... def __init__(self, a): ... self.a = a ... >>> list = [test('hello'), test('world')] >>> print list [<__main__.test instance at 0xb7d8ed4c>, <__main__.test instance at 0xb7d8eccc>] >>> list.index(test('hello')) Traceback (most recent call last): File "", line 1, in ValueError: list.index(x): x not in list >>>