0 votes
in Python by
What are generators in Python?

2 Answers

0 votes
by

The way of implementing iterators are known as generators. It is a normal function except that it yields expression in the function.

0 votes
by

Generators are most important python functions that return an iterable collection of items, one at a time, in an organized manner. Generally, generators are used to create iterators with a different approach – they use of yield keyword rather than return to return a generator object.

Related questions

0 votes
asked Sep 21, 2021 in Python by sharadyadav1986
0 votes
asked Oct 12, 2021 in Python by rajeshsharma
...