title: Writing white-space delimited text to be human readable in Python
body: <p>I have a list of lists that looks something like this:  </p>
  
  <pre><code>data = [['seq1', 'ACTAGACCCTAG'],
          ['sequence287653', 'ACTAGNACTGGG'],
          ['s9', 'ACTAGAAACTAG']]
  </code></pre>
  
  <p>I write the information to a file like this:  </p>
  
  <pre><code>for i in data:
      for j in i:
          file.write('\t')
          file.write(j)
      file.write('\n')
  </code></pre>
  
  <p>The output looks like this:  </p>
  
  <pre><code>seq1   ACTAGACCCTAG  
  sequence287653   ACTAGNACTGGG  
  s9   ACTAGAAACTAG  
  </code></pre>
  
  <p>The columns don't line up neatly because of variation in the length of the first element in each internal list. How can I write appropriate amounts of whitespace between the first and second elements to make the second column line up for human readability?</p>