This is my code which i wrote in python
n = 5
row = 2 * n - 2
for i in range(n,-1,-1):
for j in range(row):
print(end="")
row -=2
for k in range(i+1):
print('*',end=" ")
print()
The output what is get is this
* * * * *
* * * *
* * *
* *
*
i want to print this start from left to right order for example
The expected output is :-
* * * * *
* * * *
* * *
* *
*
if it's any possible way to print the elements from left to right because in most of my program i need that logic i'm searching for it please help me and even i used reversed function for loop it will reverse the loop but i'm not getting what i expect