iteration = 0 while (True): try: iteration = iteration + 1 if (iteration < 5): continue else: break print 'This statement never reached' finally: print 'Hello from finally:', iteration
Standard input is empty
Hello from finally: 1 Hello from finally: 2 Hello from finally: 3 Hello from finally: 4 Hello from finally: 5