Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 4)
4.
What happens when a generator function encounters the
yield
keyword?
Answer: Option
Explanation:
When a generator function encounters the
yield
keyword, it returns the specified value and saves its state. The next time the generator is called, it resumes execution from where it left off.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers