I have a list:
mylist = [[0, [0]], [2, [1]], [3, [4]], [4, [1, 4]]]
I want to get the index of the element of the outer list given the element.
I have tried this, but this only fetches me the outer elements of the list.
get_index = [outer for outer, inner in mylist]
I want something like this:
Input: 2
Output: 1
Input: 4
Output: 3