What is the output of the following Python code snippet?
class CM:
def __enter__(self):
print('enter', end=' ')
def __exit__(self, *a):
print('exit')
with CM():
pass
def __enter__(self):
print('enter', end=' ')
def __exit__(self, *a):
print('exit')
with CM():
pass
Correct answer
A. enter exit
7 views