Question PRG-PY-0047
MediumWhat is the output of this program?
def gen():
for i in range(3):
yield i * 10
g = gen()
print(next(g), next(g), list(g), list(g))
- A.
0 0 [20] [20]
- B.
0 10 [20] [20]
- C.
Sign up free to see the answer and a step-by-step explanation.