πŸ“Š Python
Q. Which keyword is used to define a generator in Python?
  • (A) def
  • (B) gen
  • (C) yield
  • (D) return
πŸ’¬ Discuss
βœ… Correct Answer: (C) yield

Explanation: `yield` is used to define a generator and return a value from it.

Explanation by: Mr. Dubey
`yield` is used to define a generator and return a value from it.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
47
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate