elegant way to print "==== middle justified title ====" in python
<p>As I know, there are some elegant ways to print left and right justified string with filling.
like this</p>

<pre><code>str = "left_justified"
str.ljust(20, '0');
</code></pre>

<p>or</p>

<pre><code>print "{0:{1}&lt;20}".format(str, "=")
</code></pre>

<p>result will be</p>

<pre><code>left_justified=====
</code></pre>

<p>what is the best way to print middle-justified string with filling</p>
