Python Alphabet-Sequence Square (Pattern 5)

Python Code
for x in range(1, 6):
    for y in range(65, 70):
        print(chr(y), end="")
    print()

"""
Another way

for x in 'ABCDE':
 for y in 'ABCDE':
  print(y,end="")
 print()

"""

Output:

Output of the Python Alphabet-Sequence Square pattern
BEGINNER WALKTHROUGH

How the Alphabet-Sequence Square works

Every row prints the same sequence, ABCDE, to form a five-by-five letter grid.

01

Build the rows

The outer loop repeats the line five times; the row counter is not used to change the letters.

02

Choose what each row prints

The inner loop visits character codes 65 through 69, so chr(y) prints A through E from left to right.

03

Keep the output aligned

The inner print calls use end="" to keep values on the same line. The final empty print() moves to the next row.