Skip to content

Instantly share code, notes, and snippets.

@mhcoma
Last active September 27, 2021 15:09
Show Gist options
  • Save mhcoma/1ed482286500a8348647c02d00b44e2f to your computer and use it in GitHub Desktop.
Save mhcoma/1ed482286500a8348647c02d00b44e2f to your computer and use it in GitHub Desktop.
alphabet_tower.py
n = int(input("숫자를 입력하세요 : ")); [(lambda x: (print(' ' * (n - i), end = ''), [print([chr(k) for k in range(ord('A'), ord('Z') + 1)][j % 26], end = '') for j in range(i - 1, i * 3 - 2)], print()))(i) for i in range(1, n + 1)]
@mhcoma
Copy link
Author

mhcoma commented Sep 27, 2021

숫자를 입력하세요 : 8
       A       
      BCD      
     CDEFG     
    DEFGHIJ    
   EFGHIJKLM   
  FGHIJKLMNOP  
 GHIJKLMNOPQRS 
HIJKLMNOPQRSTUV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment