Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythoncontextmanagerSingle-choice MCQ

What happens when a @contextmanager generator yields more than once?

from contextlib import contextmanager @contextmanager def cm(): yield 1 yield 2 with cm(): pass