lundi 31 mai 2021

(Python) Why does this if statement not affect the first value placed within it? [closed]

I am an amatuer coding student, self-studying python, and, at the moment, I have completed a problem but I do not understand why this solution works. I had to create code that would print this grid and I was successfully able to do it, with this code. However, despite me having gotten this correct, I fail to understand it. How come the if statement does not trigger on the first number? The first value on the grid (going horizontally) is less than ten, but there is no space before it. Shouldn't there be one, causing the grid to be offset by one? Thank you very much for the responses in advance!

Aucun commentaire:

Enregistrer un commentaire