0
Q:

how to find index of list of list in python

list.index(element)
13
#Example List
list = ['apples', 'bannas', 'grapes']
#Use Known Entites In The List To Find The Index Of An Unknown Object
Index_Number_For_Bannas = list.index('apples')
#Print The Object
print(list[Index_Number_For_Bannas])
9
[(i, colour.index(c))
 for i, colour in enumerate(colours)
 if c in colour]
0
list.index(element
0
>>> list1 = [[10,13,17],[3,5,1],[13,11,12]]
>>> list1[0][2]
17
0
First index of element "Ok" in the list :  1
0
# Find index position of first occurrence of 'Ok' in the list 
indexPos = listOfElems.index('Ok')
 
print('First index of element "Ok" in the list : ', indexPos)
0

New to Communities?

Join the community