how to make pyramid in python 3 code example
Example: pyramid pattern in python
n = 3
for i in range(1, n+1):
print(f"{' '*(n-i)}{' *'*i}"[1:])
# Output:
# *
# * *
#* * *
n = 3
for i in range(1, n+1):
print(f"{' '*(n-i)}{' *'*i}"[1:])
# Output:
# *
# * *
#* * *