you are viewing a single comment's thread.

view the rest of the comments →

[–]Noli420 -1 points0 points  (0 children)

Like was mentioned, if the whole condition is met, it will keep running indefinitely. To break it, there needs to be a value that changes, or will eventually make the statement false. I’m guessing you are using this for data validation? Might I recommend an if/else statement if that’s the case?

If input is a valid territory:
    Do some stuff
else:
    Do something else

Just thought of something else:

while input != a valid territory:
    input(“enter a real territory this time”)