What is the output of the following code? from contextlib import contextmanager @contextmanager def managed(): print(‘enter’) try: yield 42 finally: print(‘exit’) with managed() as v: print(v)

Python Professional Hard

Python Professional — Hard

What is the output of the following code? from contextlib import contextmanager @contextmanager def managed(): print(‘enter’) try: yield 42 finally: print(‘exit’) with managed() as v: print(v)

Ready to go further?

Related questions