title: Is there a simple way to match a value in a csv file using python?
body: <p>Is there a simple way to match a value in a given field of a csv file using python without using a regex? I have a field in a csv file that contains text. I wish to write a python script to do stuff to all the fields that contain the text 'eagle' in a file called file.csv.</p>
  
  <p>For example:</p>
  
  <pre><code>import csv
  
  with open('file.csv', mode='r') as infile:
      reader = csv.reader(infile)
          for row in reader:
              match = row[3]
              if match == 'eagle':
                  DO STUFF
  </code></pre>
  
  <p>The above code does not work. How can I DO STUFF with all the row[3] values that match the string 'eagle'? Thanks for the help!</p>
  
  <p>EDIT:
  here are some examples lines from 'file.csv'</p>
  
  <pre><code>tree,rock,10000,eagle
  plant,stone,500,owl
  seed,boulder,7000,crane
  fruit,pebble,60000000,hawk
  </code></pre>
  
  <p>I wish to match row[3] from line 1 and 4, then DO STUFF.</p>