Question #690

What will happen with the code snippet below?
while True:
    print(1)
    break

1 will be printed only once. Python is smart enough to make a break in a while True: stop the loop altogether. (docs.python.org/3/tutorial/controlflow.html#break-and-con...)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵


Similar questions: