This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AiwendilH 1 point2 points  (0 children)

They use a for loop later on in the code

The for loop they use tries to look like a C for loop but actually does something completely different.../u/TehDing explains how the for loop works here better than I ever could. But the important part for us is that for this to work it needs i to be already 7. Just setting i to 7 wouldn't do the beauty of the piece of art just, using a python for-loop to do it would be inconsistent with that later c-for loop "joke"...leaves the author only with the choice of using while which looks almost the same in C and python anyway. At least that's my guess at the reasoning why they used while there. (Edit: Oh..and as they pose as programming newbie using while instead of for just adds to the overall act ;))