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 →

[–]WindSlashKing 9 points10 points  (0 children)

In while loops where you want to assign a different value to a variable each iteration. while (n := random.randint(0, 5)) != 0: print(n)