Python Descending-Number Diamond (Pattern 55)

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

Output:

Output of the Python Descending-Number Diamond pattern
BEGINNER WALKTHROUGH

How the Descending-Number Diamond works

The row sequences grow toward the middle and then contract, counting down from 3 to the current edge.

01

Build the rows

The outer counter crosses zero, so abs(x) makes the row lengths expand and then shrink symmetrically.

02

Choose what each row prints

The inner counter begins at 3 and counts down to abs(x), printing the same descending sequence on each side.

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.