title: Incrementing in list comprehension
body: <p>I want to increment my list by one for each iteration. For example in the sample code I created a list readers. Now readers contains all the rows of my CSV file. What I am trying to do is to start from first row , look if the condition is satisfied then iterate to the next row by increment the list by 1. Any idea how can I proceed with it ? Before print(row) I want to increment the list by 1 and look for some other conditions if they are satisfied or not. </p>
  
  <pre><code>for path in glob.glob("out.csv"):
      if path == "out1.csv": continue
      with open(path) as fh:
          reader = csv.reader(fh)
          readers = list(reader)
          for row in readers:
              if corner1 in row:
                  if search_string in row:
  
                      if state0 in row:
  
  
                          print(row)
                          writer.writerow(row + [] + [row[2]])
                          break
  </code></pre>