Write a python program to print a right angle triangle star pattern

Write a python program to print a right angle triangle star pattern. In the Python programming language, build a one-side pyramid pattern.The pattern program in Python will be printed by this program. A right-angled triangle has one right-angled angle. The foundation of trigonometry is the relationship between the sides and angles of a right triangle.

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