Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 19)
19.
In Python, what does the
generator.throw()
method do?
Answer: Option
Explanation:
generator.throw()
is used to throw an exception inside the generator. This can be useful for handling specific conditions within 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