Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 48)
48.
What happens if a generator function contains both
yield
and return
statements?
Answer: Option
Explanation:
If a generator function contains both
yield
and return
statements, it returns the specified value and stops the generator.
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