Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You are looking at whole tuples with unicode strings; the <code>u''</code> is normal when showing you a tuple with unicode values inside:</p> <pre><code>&gt;&gt;&gt; print u'Hello World!' Hello World! &gt;&gt;&gt; print (u'Hello World',) (u'Hello World',) </code></pre> <p>You want to format each row:</p> <pre><code>print u' {:&lt;15} {:&lt;8} {:&lt;6}'.format(*row) </code></pre> <p>See the <a href="http://docs.python.org/2/library/stdtypes.html#str.format" rel="nofollow"><code>str.format()</code> documentation</a>, specifically the <a href="http://docs.python.org/2/library/string.html#formatstrings" rel="nofollow">Format Syntax reference</a>; the above formats 3 values with field widths, left-aligning each value into their assigned width.</p> <p>The widths are approximate (I didn't count the number of spaces in your post exactly), but should be easy to adjust to fit your needs.</p> <p>Demo:</p> <pre><code>&gt;&gt;&gt; row = (u'31/05/2013', u'11:10', u'$487') &gt;&gt;&gt; print u' {:&lt;15} {:&lt;8} {:&lt;6}'.format(*row) 31/05/2013 11:10 $487 </code></pre> <p>or, using a loop and a sequence of row entries:</p> <pre><code>&gt;&gt;&gt; rows = [ ... (u'31/05/2013', u'11:10', u'$487'), ... (u'31/05/2013', u'11:11', u'$487'), ... (u'31/05/2013', u'11:13', u'$487'), ... (u'31/05/2013', u'11:19', u'$487'), ... ] &gt;&gt;&gt; for row in rows: ... print u' {:&lt;15} {:&lt;8} {:&lt;6}'.format(*row) ... 31/05/2013 11:10 $487 31/05/2013 11:11 $487 31/05/2013 11:13 $487 31/05/2013 11:19 $487 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload