*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
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.
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('')
Written by Shubhranshu Shekhar, who has trained 20000+ students in coding.
Shubhranshu Shekhar is a coding instructor, mentor, and founder of VSIT Delhi with 20+ years of teaching experience (since 2004). He has guided many students who are now working in multinational companies and specializes in Full Stack Development, Python, Digital Marketing, and Data Analytics.