Star Pyramid

Python Programming

Python Programming Examples

#!/usr/bin/evn python

for i in range(1,6):
    # String repetition using '*'
    print (' '*(5-i),'*'*(i*2))



#***** Output *****
      **
    ****
   ******
  ********
 **********

Learn more about String