def draw_pyramid(levels):
for i in range(levels):
print(' ' * (levels - i - 1) + '*' * (2 * i + 1))
draw_pyramid(5)
부적절한 질문입니다.
def draw_pyramid(levels):
for i in range(levels):
print(' ' * (levels - i - 1) + '*' * (2 * i + 1))
draw_pyramid(5)