LogiQuest
Back to Comprehensions and Generators
16

What is the output of the following code?

g = (x for x in [1, 2])
print(list(g), list(g))
Medium

Discussion (0)

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

Log in to join the discussion.