title: Python - Searching .csv file with rows from a different .csv file
body: <p>All -</p>
  
  <p>I am attempting to read a single row from a csv file and then have it search another csv file.</p>
  
  <p>I have a masterlist.csv that has a single column called empID.  It contains thousands of rows of 9 digit numbers. As well I have ids.csv that also contains a single column called number.  It contains hundreds of rows.  I am attempting to pull a row from the ids.csv do a search on the masterlist.csv and print out whether it has been found. Then it needs to move to the next row in ids.csv until each row in ids.csv has been searched within the masterlist.csv.
  I thought it would be as simple as this, however it is not throwing any errors nor returning any results.</p>
  
  <p>Using Python 2.7.12
      import csv</p>
  
  <pre><code>masterReader = csv.reader(open("masterlist.csv", "rt"), delimiter=",")
  idsReader = csv.reader(open("ids.csv", "rt"), delimiter=",")
  
  
  for number in idsReader:
      for empID in masterReader:
          if number == empID:
              print (" Found in MasterFile")
          else:
              print ("Is Not Found in MasterFile")
  </code></pre>
  
  <p>Edit: Adding snippet of data used for testing.</p>
  
  <p><a href="https://i.stack.imgur.com/vJroB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vJroB.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/nYhe4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nYhe4.png" alt="enter image description here"></a></p>