title: Draw hollow triangles in Python
body: <p>I have written the code to draw a filled triangle.</p>
  
  <pre><code>for i in range(1,n+1):
      for j in range(1,n-i+1):
          print' ',
      for k in range(1,2*i):
          print'*',
      print
  </code></pre>
  
  <p>Which prints the following pattern(for n=5)</p>
  
  <pre><code>      *
      * * *
    * * * * *
  * * * * * * *
  </code></pre>
  
  <p>However i cannot draw the hollow triangle.</p>
  
  <pre><code>      *
      *   *
    *       *
  * * * * * * *
  </code></pre>
  
  <p>Here some of the stars are replaced with blank spaces. Anyone can help me?Thanks in advance.        </p>