Python Increasing-Letter Diamond (Pattern 58)

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

Output:

Output of the Python Increasing-Letter Diamond pattern
BEGINNER WALKTHROUGH

How the Increasing-Letter Diamond works

The rows build toward ABCD in the middle and then shrink back to a single D.

01

Build the rows

The outer counter crosses zero, and its absolute value makes the upper and lower row widths match.

02

Choose what each row prints

The inner range begins at abs(x) and increases to 3; chr(y + 65) maps those positions to 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.