title: Write a text file for each row in a csv
body: <p>I have a CSV file in the following format:</p>
  
  <pre><code>Name  Seq
  a     atcg
  b     ggct
  c     ccga
  </code></pre>
  
  <p>I wish to create individual text files for each row, where named the file is named based on one column and the file contents are based on another column.</p>
  
  <p>I currently have this code:</p>
  
  <pre><code>import csv
  with open('prac.csv') as csvfile:
      reader = csv.DictReader(csvfile)
      for row in reader:
          file_name ='{0}.txt'.format(row['name']) 
          with open(file_name, 'w') as f:
              pass
  </code></pre>
  
  <p>Which creates text files with the values in the 'Name' column for each row. However I am unsure how to write the 'Seq' column to each text file.</p>