Export statements in CSV file
<p>I'd like to make statement and export the results in another CSV file called for example <code>EXPORT.csv</code>.  This is my code:  </p>

<pre><code>import csv

#import and export files

fichier2 = "/home/julien/excel/ABORD.csv"
file1 = open (fichier2, "rb")

fichier = "/home/julien/excel/EXPORT.csv"
file2 = open (fichier, 'wb')

reader = csv.reader (file1, delimiter = ';', quotechar=' ')
writer= csv.writer(file2, delimiter= ';', quotechar=' ')

#statements on file csv

for row in reader:
        if row[2] == '':
                print(row[1], "AD_REVE is NULL whereas it should not")
        elif row[2]== "Neant":
                print (row[1], "AD_REVE is Neant whereas it should not")
        else:
                print (row[1], "ok")
</code></pre>

<p>How could I export all these results in the <code>EXPORT.csv</code> with the <code>writer.writerow ()</code>?</p>
