Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 6)
6.
What is the purpose of the
next()
function when working with generators?
Answer: Option
Explanation:
The
next()
function is used to retrieve the next element produced by a generator. It advances the generator's state and returns the value generated by the yield
statement.
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