Skip to content

Instantly share code, notes, and snippets.

@teamvista
Last active October 18, 2020 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teamvista/6f47c1a1e41c9f34b03ed2c48660bdb5 to your computer and use it in GitHub Desktop.
Save teamvista/6f47c1a1e41c9f34b03ed2c48660bdb5 to your computer and use it in GitHub Desktop.
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