1 2 3 4 5 6 7 8 9 | * * * * * * * * * * * * * * * * * * * * * * * * * |
This is a star pattern program in Python that can be created with the help of nested loop that will iterate from row as in i and j as in column.
01 02 03 04 05 06 07 08 09 10 | row = 5 ; for i in range (row): for j in range (i): print ( '* ' , end = "") print ('') for i in range (row, 0 , - 1 ): for j in range (i): print ( '* ' , end = "") print ('') |