loops - Making a pattern in python -


i not know how use loops in python , need make pattern:

* ** *** ****  *****  

this have tried:

for x in range(0, 5):   print ("*")     

and result is:

* * * * * 

here's step-by-step solution.

# loop cnt in range(1,6):     # print 'cnt' number of asterisks     print(cnt * '*') 

the result is:

* ** *** **** ***** 

Comments