Make python spit out results that's all pretty like

Make python spit out results that's all pretty like

buq25

2008 Jul 5 • 572
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.
Today's post brought to you by the letter: "heck".
 
 
2016 Apr 2 at 01:02 PDT — Ed. 2016 Apr 2 at 01:09 PDT
phoenix_r

2009 May 13 • 891
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.
BOO
 
 
2016 Apr 7 at 01:34 PDT
SuperJer
Websiteman

2005 Mar 20 • 5634
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 • 891
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.
BOO
 
 
2016 Apr 7 at 13:36 PDT
Page [1]