what is the role of yield in the code ? looping is done by while loop then what is it doing
Generators in python
hey @wick007,
There are two methods to send back something, return and yield.
return ends the loop where as ,
yield returns the data without stopping the loop, so that the function that is needing the data gets it and parallelly the code is generating further answers to be returned.