DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pyramid pattern in python
n = 3 for i in range(1, n+1): print(f"{' '*(n-i)}{' *'*i}"[1:]) # Output: # * # * * #* * *
Source by www.programiz.com #
PREVIOUS
NEXT
Tagged:
#pyramid
#pattern
#python
ADD COMMENT
Topic
COMMENT
Name
9+6 =
Submit