Intermediate
Python
Q51 / 101
What does yield from do in a generator?
Correct! Well done.
Incorrect.
The correct answer is B) Delegates to a sub-generator, transparently passing values and exceptions
B
Correct Answer
Delegates to a sub-generator, transparently passing values and exceptions
Explanation
yield from sub_gen() delegates iteration to sub_gen, forwarding sends and throws, simplifying generator composition.
Progress
51/101