title: csv.writer - How to dynamically write columns in writerow(n1,n2,n3, ...nth)?
body: <p>I am trying to write to a CSV file. I want to write three variables on a row and then write a variable number of columns.</p>
  
  <p>So for example my script will do a bunch of calculations and come up with the idea that I need 12 columns.
  So the 'variable' needs to contain column 0 thru 11.</p>
  
  <p>How to do this dynamically?</p>
  
  <pre><code>numberofcolumns = 12
  with open(f+".csv",'wb') as output_csvfile:
      filewriter = csv.writer(output_csvfile)
      filewriter.writerow([constant1,constant2,constant3,variable[0],...,variable[n]])
  </code></pre>
  
  <p>What I want is to do 
  <code>filewriter.writerow([constant1, constant2, constant3, variable[0], variable[1],....,variable[11]])</code>
  However variable[11] may not be 11 it may be 8 or 10 or whatever. the length is dynamic. How can I make it so that this code will be able to output to Nth column if the function writerow() isn't defined to use *args?</p>