title: Python writerow method for csv
body: <p>I am using writerow method in python for writing list of values in csv file and it keeps on adding a new line after every row i add. How to stop adding new line ? Below is the chunk of code</p>
  
  <pre><code>for exception in tempList:
          statItem = (exception['count'],exception['stack'])
          locStatList.append(statItem)
  
          sortedStatTempList = sorted(locStatList, key=itemgetter(0), reverse=True)
          writer = csv.writer(open("temp",'w'),quotechar='\x00')
          writer.writerow(["Server Name","JVM","Instance Exception"])
  
      for exception in sortedStattempList :
  
          s = str(exception[0])
          p = exception[1]
  
          tempVar = 'All Tomcat Servers'+','+s+','+p  
  
          writer.writerow([tempVar])
  </code></pre>