Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 91)
91.
How does the
itertools.cycle()
function behave when used with an empty generator?
Answer: Option
Explanation:
itertools.cycle()
raises a StopIteration
exception when used with an empty generator, as there are no elements to repeat.
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