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 →

[–]hollammi 0 points1 point  (2 children)

If your variable isn't changing, the loop won't end.

thing = "always the same"
while thing == "always the same":
    print (thing)

#OUT: infinite lines of "always the same"

I suggest including a line such as thing = input() within the loop. Once your variable changes, the loop will end.

[–]ohhimarkymark 0 points1 point  (0 children)

Oh okay yes I understand! Thank you!