Last active
October 18, 2020 03:42
-
-
Save teamvista/6f47c1a1e41c9f34b03ed2c48660bdb5 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 stairway(start, lines): | |
out = "" | |
num = start | |
for i in range(lines): | |
l_contents = [x+num for x in range(i+1)] | |
out += f"{' '.join(str(j) for j in l_contents)} " | |
num += i+1 | |
out = out[:-1] | |
return out | |
print(stairway(666, 30)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment