Problem Statement
What does 'yield from subgen' do in a generator?
Explanation
yield from passes through values, exceptions, and the close or send calls to the subgenerator. It also captures the subgenerator's return value as the expression result.
This makes generator composition simple and keeps control flow readable.
Code Solution
SolutionRead Only
def outer():
result = yield from inner()
yield result