Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What happens when the yield keyword is executed in a generator function?
yield
It raises a StopIteration error.
StopIteration
The function pauses, saves its state, and outputs the yielded value.
The function terminates and its local variables are deleted.
It converts the current loop into a list comprehension.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!