Question: Here is my code:

```py
test_list= [
    ["Romeo and Juliet","Shakespeare"],
    ["Othello","Play"],
    ["Macbeth","Tragedy"]
]

value = "Tragedy"

print(test_list.index(value))

```

As a result I get “ValueError: ‘Tragedy’ is not in list

I’d come to the conclusion that .index only works for 1D arrays? But then how do I do it die 2D arrays? This code works fine if I make the array 1D. Please help, but in simple terms as I am a beginner.

Apologies for formatting issues on mobile. The array is set out correctly for me.

Answer: 
Loop through your list and search each sublist for the string.

```
Testlist = [
               ["Romeo and Juliet","Shakespeare"],
               ["Othello","Play"],
               ["Macbeth","Tragedy"]
               ]

Value = "Tragedy"

for index, lst in enumerate(Testlist):
  if Value in lst:
    print( index, lst.index(Value) )

```
numpy arrays may help in your specific case

```
import numpy

test_array = numpy.array(Testlist)
value = "Tragedy"

numpy.where(test_array==value)
# you will get (array([2]), array([1]))

```