What are generator function?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at the International Renewable Energy Agency, Lives in Abu Dhabi, UAE.
In computer science, a generator is a special routine that can be used to control the iteration behaviour of a loop. In fact, all generators are iterators. A generator is very similar to a function that returns an array, in that a generator has parameters, can be called, and generates a sequence of values.
2023-05-10 12:30:26
评论(499)
Helpful(122)
Helpful
Helpful(2)

Emily Powell
QuesHub.com delivers expert answers and knowledge to you.
In computer science, a generator is a special routine that can be used to control the iteration behaviour of a loop. In fact, all generators are iterators. A generator is very similar to a function that returns an array, in that a generator has parameters, can be called, and generates a sequence of values.