LogiQuest
Back to Comprehensions and Generators
6

What is the output of the following code?

def gen():
    yield 1
    yield 2
print(list(gen()))
Easy

Discussion (0)

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

Log in to join the discussion.