MCQ Practice Single Best Answer Topic: Create Objects in Python

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

Question ID
#20257
Subchapter
Create Objects in Python
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

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

Explanation

The correct answer is: yield

Share This Question

Share this MCQ with your friends or study group.