title: Return a value from csv file by iterating over a 2D array in a specific manner
body: <p>I have an array and I want to get values from a csv file which match the elements of a given array. I have tried with the following code but it only checks for 1st element and exits loop. Can anyone help me out on how to iterate over all elements in the given array?
  Thank you in advance.</p>
  <p>Here is my code which I have tried.</p>
  <pre><code>import csv
  
  location_file = csv.reader(open('Location.csv', &quot;r&quot;), delimiter=&quot;;&quot;)
  
  test_array = [['16', '2'],['19', '2'],['16', '8'],['16', '9'],['16', '10'],['11', '2'],['11', '6'],['1', '12'],['1', '5'],['1', '4'],['4', '4'],['4', '6'],['14', '2'],['14', '7']]
  
  for i in range (13):
      if i &gt;= 0:
          for row in location_file:     
              if test_array[i][0] == row[2] and test_array[i][1] == row[3]:
                  print(row[0])
  </code></pre>