What does the “yield” keyword do?

0 like 0 dislike
26 views
What is the use of the yield keyword in Python, and what does it do?
by (550 points) | 26 views

1 Answer

0 like 0 dislike

To understand what yield does, you must understand what generators are. And before you can understand generators, you must understand iterables.

by (1.2k points)

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
asked Mar 25, 2019 by lhav
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
1,117 users