Skip to main content
5 of 7
edited body
ospahiu
  • 243
  • 1
  • 8

Python 2, 100 bytes

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2
for i in range(51):print(s[:-i-1]+s[-i-3::-1],s[:i]+s[i::-1])[26>i]

Run it

Thanks to @LeakyNun and @manatwork for pointing out a few byte saves.

Non-Golfed:

def print_alphatriangle(n):
    s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"*n
    for i in range(len(s) - 1):
        if len(s) / 2 > i:
            print s[:i] + s[i::-1]
            continue
        print s[:-i-1] + s[-i-3::-1]

This method works simply by string splicing an alphabet string that is concatenated together.

ospahiu
  • 243
  • 1
  • 8