title: csv writer saves file as .txt in python
body: <p>I'm fairly new to Python, so I'm sorry if this is obvious, but my code is very simple, so I don't understand where it's going wrong. I'm using the csv module to read one file which contains info from two different sources (L and R) and splitting it into two new files. The problem is, when it creates the new files, it creates them as .txt files, which I've never seen before in csv writing.</p>
  
  <pre><code>import csv
  with open('dataset1.csv') as csvfile:
      filein = csv.reader(csvfile)
      with open('dataset1Left', 'w', newline = '') as fixleft: 
          fixleftwriter = csv.writer(fixleft)
          with open('dataset1Right', 'w', newline = '') as fixright:
              fixrightwriter = csv.writer(fixright)
              for row in filein:
                  if (row[2] == 'L'):
                      fixleftwriter.writerows([row])
                  elif (row[2] == 'R'):
                      fixrightwriter.writerows([row])
      csvfile.close()
  </code></pre>