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

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