I am using the following for loop code to print a star pattern and the code is working perfectly fine.
Here is my code:
for i in range(1,6):
for j in range(i):
print("*", end=" ")
print()
This code displays:
*
* *
* * *
* * * *
* * * * *
Now, my question is how to print the output like this:
*
* *
* * *
* * * *
* * * * *