Question: > 
> **Possible Duplicate:**  
> 
> [Pyramid of asterisks program in Python](https://stackoverflow.com/questions/4911341/pyramid-of-asterisks-program-in-python) 
> 
> 
> 

I've written a program in C++ that displays a pyramid of asterisk (see below) and now I'd like to see how it's done in Python but it's not as easy as I'd thought it would be. :) Has anyone tried this and if so could you show me code that would help out? 2) Within those lines the number of "\*" will appear as an ODD number
(1 ,3 ,5 ,7 ,9 )

this is the output

```
   *  1
 ***  3
***** 5

```

Answer: 
Disclaimer: This may not work in Python 3.x:

```
Python 2.7.1 (r271:86832, May 27 2011, 21:41:45) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print '''   *  1
...  ***  3
... ***** 5'''
   *  1
 ***  3
***** 5

```
It's not that difficult..

```
>>> lower = 1
>>> higher = 19
>>> for i in xrange(lower,higher,2):
...     print ' ' * [Calculation Here] + '*' * i
... 
         *
        ***
       *****
      *******
     *********
    ***********
   *************
  ***************
 *****************

```