Q. Which keyword is used to create a generator function?

  • (A) yield
  • (B) return
  • (C) generate
  • (D) func
πŸ’¬ Discuss
βœ… Correct Answer: (A) yield
Explanation: `yield` is used inside functions to make them generators.
Explanation by: Mr. Dubey
`yield` is used inside functions to make them generators.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
97
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
80%
Success Rate