Answers for "half pyramid pattern in python"

2

pyramid pattern in python

n = 3
for i in range(1, n+1):
  print(f"{' '*(n-i)}{' *'*i}"[1:])
  
# Output:
#  *
# * *
#* * *
Posted by: Guest on February-23-2021

Code answers related to "half pyramid pattern in python"

Python Answers by Framework

Browse Popular Code Answers by Language