Build the rows
The outer loop repeats the row block five times. Its x counter marks the row but does not affect the printed values.
Each of the five rows reads 12345, making this a clear example of a fixed-width number grid.
The outer loop repeats the row block five times. Its x counter marks the row but does not affect the printed values.
The inner y loop restarts at 1 for every row and prints each column number without a separator.
The inner print calls use end="" to keep values on the same line. The final empty print() moves to the next row.