Created
May 17, 2018 03:01
-
-
Save harry-jung/e724e9ad93c6346aec5f0076aca4bbfd to your computer and use it in GitHub Desktop.
피라미드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def printPyramid(num): | |
matrix = list(map(lambda i: num-abs(i), list(range(num-1, -num, -1)))) | |
for i in matrix: | |
print(''.join(str(e) for e in matrix[i-1:(len(matrix)-(i-1))]).center(len(matrix), ' ')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment