Skip to content

Instantly share code, notes, and snippets.

@nuriyevn
Created April 30, 2021 13:25
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 nuriyevn/68b546ad547de90e7b93379f95cda897 to your computer and use it in GitHub Desktop.
Save nuriyevn/68b546ad547de90e7b93379f95cda897 to your computer and use it in GitHub Desktop.
import string
alpha = string.ascii_lowercase
n = int(input())
L = []
for i in range(n):
s = "-".join(alpha[i:n])
L.append((s[::-1]+s[1:]).center(4*n-3, "-"))
print('\n'.join(L[:0:-1]+L))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment