To print a right half pyramid pattern in Python, you can use nested loops to control the number of rows and columns printed.
In this example,
n
to represent the number of rows in the pyramid.n = 5
for i in range(1, n+1):
row = ''
for j in range(1, i+1):
row += '*'
print(row)
* ** *** **** *****
In this tutorial, we learned How to print Right Half Pyramid Pattern in Python language with well detailed examples.