Single Choice
Not Set
QWhat will be the output after the following statements?
def gen():
x = 2
while True:
yield x
x += 1
y = gen()
for i in y:
if i >= 5:
break
else:
print(i, end='')
ID: #3554
Python Generators MCQ
777 views
Question Info
#3554Q ID
Not SetDifficulty
Python Generators MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
234
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic