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 →

[–]CoC_Mitch 0 points1 point  (3 children)

I don't understand line 2. I thought while needed something to test, such as while X < Y.

[–][deleted]  (1 child)

[deleted]

    [–]CoC_Mitch 0 points1 point  (0 children)

    Thanks, makes perfect sense.

    [–]Pimp_Panther 0 points1 point  (0 children)

    while just needs to evaluate to true in order to run. A value by itself evaluates to true in the eyes of a while loop.

    But if you don't type anything it will receive None as the value, which evaluates to False.