Pascal triangle program in python using for loop

Pascal triangle program in python using for loop. Python programming language Pascal pattern program. The pascal pattern program is printed in the output of this program. This pattern program is very similar to python’s pascal program.

line = 5
for i in range(0, line):
for j in range(0, i + 1):
print("*", end=' ')
print("\r")
for i in range(line, 0, -1):
for j in range(0, i - 1):
print("*", end=' ')
print("\r")

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