+ 1

How to use the yield statement?

18th Nov 2018, 12:03 PM
Tarek Issaoui
3 Respostas
18th Nov 2018, 12:27 PM
Kishalaya Saha
Kishalaya Saha - avatar
+ 3
Yield is somewhat then same as return. You use return when you expect one value back from your function. And yield when you are expecting a number of values back.
18th Nov 2018, 12:35 PM
Paul
Paul - avatar