For a one dimensional list, the index of an item is found as follows:
a_list = ['a', 'b', 'new', 'mpilgrim', 'new']
a_list.index('mpilgrim')
What is the equivalent for a 2 or n dimensional list?
Edit: I have added an example to clarify: If I have a 3 dimensional list as follows
b_list = [
[1,2],
[3,4],
[5,6],
[7,8]
],
[
[5,2],
[3,7],
[6,6],
[7,9]
]
Now lets say I want to identify a certain value in this list. If I know the index of the 1st and 2nd dimesion but don't know the zero-th index for the value I want, how do I go about finding the zero-th index?
Would it be something like:
target_value = 7
b_list[0].index(target_value)
With the output being an integer: 0