Question PRG-PY-0070
HardWhat is the output of this program?
def gen():
x = yield 1
print("got", x, end=" ")
yield x * 2
g = gen()
print(next(g), end=" ")
print(g.send(5))
- A.
1 got None 10
- B.
1 got 5 10
- C.
Sign up free to see the answer and a step-by-step explanation.