LogiQuest
Back to Comprehensions and Generators
19

What is the output of the following code?

def gen():
    x = yield 1
    yield x * 10
g = gen()
print(next(g), g.send(5))
Hard

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.