title: What is the best way to print a table with delimiters in Python
body: <p>I want to print a table mixed with string and float values, as tab delimited output printout. Sure I can get the job done:</p>
  
  <pre><code>&gt;&gt;&gt; tab = [['a', 1], ['b', 2]]
  &gt;&gt;&gt; for row in tab:
  ...     out = ""
  ...     for col in row:
  ...             out = out + str(col) + "\t"
  ...     print out.rstrip()
  ... 
  a   1
  b   2
  </code></pre>
  
  <p>But I have a feeling there is a better way to do it in Python, at least to print each row with specified delimiter, if not the whole table. Little googling (from <a href="http://skymind.com/~ocrow/python_string/" rel="nofollow noreferrer">here</a>) and it is already shorter:</p>
  
  <pre><code>&gt;&gt;&gt; for row in tab:
  ...     print "\t".join([str(col) for col in row])
  ... 
  a   1
  b   2
  </code></pre>
  
  <p>Is there still a better, or more Python-ish, way to do it?</p>