Question #879

What is the output of the code snippet below?
running = True
while running:
    print(1)
    running = False
    continue
    print(2)

Every time the continue keyword is reached within the while loop, the execution jumps to the next iteration of the loop. print(2) is never reached. (tutorialspoint.com/python/python_continue_statement.htm)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵