title: Using Python to populate a csv file
body: <p>The following piece of code creates a CSV file, but every other line is blank. How can I prevent these linebreaks from happening?</p>
  
  <pre><code>import datetime
  import time
  import csv
  
  i = 0
  while i &lt; 10:
      TempProbe = "78.12" 
      CurrentTime = time.strftime("%x")
      CurrentDate = time.strftime("%I:%M:%S")
      stringAll = TempProbe + "," + CurrentTime + "," + CurrentDate
      print(stringAll)
      file = open("outFile.csv", "a")
      csvWriter = csv.writer( file )
      csvWriter.writerow( [TempProbe, CurrentTime,CurrentDate] )
      file.close()
      i = i + 1
      time.sleep(1)
  </code></pre>