Make python spit out results that's all pretty like

Make python spit out results that's all pretty like

buq25

2008 Jul 5 • 570
295 ₧
What it's like:


What I want it to be like(simulated using Mspaint):


Is there any fancy thing to do that? Like pressing tab in most text editors.
 
 
2016 Apr 2 at 01:02 PDT — Ed. 2016 Apr 2 at 01:09 PDT
phoenix_r

2009 May 13 • 888
17 ₧
I don't know python really so I'm sure there's something better than this, but one solution is to count the length of each component of the output and then pad the rest with the necessary amount of spaces.
BOOOOO
 
 
2016 Apr 7 at 01:34 PDT
SuperJer
Websiteman

2005 Mar 20 • 5351
Maybe use rjust:

python code
str(6.55).rjust(10)


Just make sure the 10 is enough width.
 
 
2016 Apr 7 at 10:04 PDT
phoenix_r

2009 May 13 • 888
17 ₧
SuperJer said:
Maybe use rjust:

python code
str(6.55).rjust(10)


Just make sure the 10 is enough width.



This looks like that better way that I mentioned.
BOOOOO
 
 
2016 Apr 7 at 13:36 PDT
Page [1]