Last active
May 6, 2020 14:45
-
-
Save likewinter/7a7e49012235e81765fc569215389367 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
count = 9 | |
for i in range(count * 2 - 1): | |
line = '' | |
maxNum = i + 1 if i < count else count * 2 - i - 1 | |
for c in range(1, maxNum * 2): line += str(c) if c < maxNum else str(maxNum * 2 - c) | |
print((count - maxNum) * ' ' + line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Animated version from 2 to 9