a = [[1,2],[3,4]] b = [[2,3],[4,5]] # Works correctly, returns 0 a.index([1,2]) # Throws error because list does not contain it b.index([1,2])