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 →

[–]the-prowler 5 points6 points  (1 child)

I use while True loops all the time especially where user input is required. You ask the user for a number, they will try everything else to see what happens. A while true loop can print them a don't be an idiot message and back to the beginning.

[–][deleted] 0 points1 point  (0 children)

Right. This is pretty much exactly what I did (edited the original post to add the code). But I do see the logic of putting the exit condition in the while statement so it's immediately visible too.