MCQ Single Best Answer Difficult

QWhich of the following keyword is necessary for defining a generator function?

ID: #20257 Create Objects in Python 97 views
Question Info
#20257Q ID
DifficultDifficulty
Create Objects in PythonTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A iter
  • B generate
  • C return
  • D yield
Correct Answer: Option D

Explanation

The correct answer is: yield

Share This Question

Challenge a friend or share with your study group.