Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythongenerators and yieldSingle-choice MCQ

In `result = yield from subgen()`, where does the value bound to `result` come from?

def sub(): yield 1 yield 2 return 99 def main(): result = yield from sub() yield result print(list(main())) # [1, 2, 99]