Build the rows
The outer loop runs from the top row toward the base; its first inner loop prints one fewer leading space per row.
Five centered rows contain 1, 3, 5, 7, and 9 stars.
The outer loop runs from the top row toward the base; its first inner loop prints one fewer leading space per row.
The inc counter starts at 1 and grows by 2 after each row, creating the odd star counts of a pyramid.
The inner print calls use end="" to keep values on the same line. The final empty print() moves to the next row.