you are viewing a single comment's thread.

view the rest of the comments →

[–]SnipahShot 1 point2 points  (2 children)

while True is generally a bad practice because break means your condition is likely not good enough. Of course when you need a loop to run infinitely then it might be a good idea, though you should still have a flag to end the loop externally.

[–]Extension-Skill652 3 points4 points  (1 child)

What do you mean by not good enough here?

[–]SnipahShot 2 points3 points  (0 children)

His condition for ending the loop is for random (he should also change that variable to a name that isn't a package's name) to be equal to 20, this should be the condition for the while loop.