I want to fetch the inner list from 'list1' when the second colomn element of 'list1' matches with the element coming in loop of 'list2'
I have a list like this:
list1=
[
[1546,'token1',12,442],
[23,'token2',4,542],
[6,'token3',34,462],
[336,'token4',45,642],
[146,'token5',43,62],
]
and another list :
list2=['token1','token2','token3','token4','token5']
for element in list2:
Here I want if element == list1 second colomn element (i.e. 'token1'==list1's second colomn element 'token1')
then I get the list
[ID,element,value1,value2] (ie [1546,'token1',12,442]) from list1.