Python Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 56)
56.
How can you create a generator function?
By using the generator keyword.
By using the yield keyword in a function.
By using the iter keyword.
By using the return keyword in a function.
Answer: Option
Explanation:
A generator function in Python is created by using the yield keyword to produce a series of values over time.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.