Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 8)
8.
What will happen if a generator function reaches the end of its execution?
Answer: Option
Explanation:
When a generator function completes its execution or reaches a
return
statement, it raises a StopIteration
exception to indicate the end of the iteration.
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