Sunday 15 July 2012

python - align float and specify precision in string formatting -


I have a test code doing this:

  in [16]: print "{: & Gt; 20} {: 0.2 F}" Format (", 34) 34.00   

But I want to do it with just one argument in the format, how do I write it?

 > < (I have only one distance from the empty space in my example) Print "{: & gt; 25.2f} ". Format (34) 34.00   

What it looks for me:

 Enter image details here

No comments:

Post a Comment