Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 24)
24.
What happens if a generator function contains a
return
statement with a value?
Answer: Option
Explanation:
If a generator function contains a
return
statement with a value, it will raise 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