Build the rows
The outer loop counts rows from 1 to 5, and the inner loop checks each of the eleven columns.
The two widening diagonals display their row number, while spaces fill the rest of each line.
The outer loop counts rows from 1 to 5, and the inner loop checks each of the eleven columns.
When a column matches px or py, the code prints x; after each line those markers move outward to form a V.
The inner print calls use end="" to keep values on the same line. The final empty print() moves to the next row.