Python Centered Increasing-Letter Diamond (Pattern 62)

Python Code
size = 3
for x in range(size, -(size + 1), -1):
    for y in range(abs(x), 0, -1):
        print(" ", end="")
    for z in range(abs(x), 4):
        print(chr(z + 65), end="")
    print()

Output:

Output of the Python Centered Increasing-Letter Diamond pattern
BEGINNER WALKTHROUGH

How the Centered Increasing-Letter Diamond works

The centered lines grow toward ABCD and then shorten in the same order.

01

Build the rows

The outer loop creates matching upper and lower halves; abs(x) determines the leading spaces and sequence start.

02

Choose what each row prints

The inner counter rises to 3, and chr(z + 65) converts each value to a letter from A through D.

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.