title: Format in python by variable length
body: <p>I want to print a staircase like pattern using .format() method.
  I tried this,</p>
  
  <pre><code>for i in range(6, 0, -1):
      print("{0:&gt;"+str(i)+"}".format("#"))
  </code></pre>
  
  <p>But it gave me following error :</p>
  
  <pre><code>ValueError: Single '}' encountered in format string
  </code></pre>
  
  <p>Basically the idea is to print</p>
  
  <pre><code>     #
      #
     #
    #
   #
  #
  </code></pre>
  
  <p>with code that looks similar to,</p>
  
  <pre><code>for i in range(6, 0, -1):
      print("{0:&gt;i}".format("#"))
  </code></pre>