Build the rows
The outer counter x increases from 1 to 5, selecting the digit printed on each row.
The rows contain five 1s, four 2s, three 3s, two 4s, and one 5.
The outer counter x increases from 1 to 5, selecting the digit printed on each row.
The inner range counts down from 5 to x, so each new row has one fewer copy of x.
The inner print calls use end="" to keep values on the same line. The final empty print() moves to the next row.