Python Programming - Generators - Discussion
Discussion Forum : Generators - General Questions (Q.No. 2)
2.
How is a generator function different from a regular function?
Answer: Option
Explanation:
Generator functions in Python use the
yield
keyword to produce a sequence of values. When a generator function is called, it returns a generator object that can be iterated over to get values one at a time.
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