I want to print the below pattern
*
* *
* * *
* * * *
* * * * *
My logic written
for row in range(1,6):
for col in range(1,6):
if row is col:
print(row * '* ')
Can someone review the code and suggest any improvements needed
The code which i have written is it a right approach ?