Generators | Sololearn: Learn to code for FREE!
+ 2

Generators

I was going through python 3 course and came across generators and couldn't get the logic. Need help

27th May 2020, 1:52 PM
BENJAMIN LIMBU SUBBA
BENJAMIN LIMBU SUBBA - avatar
1 ответ
+ 3
Generators use the syntax yield... They are similar to return... But they provide a list which makes it a lot easier to handle the output Most of the time when there are multiple outputs in a function I prefer to use generators
27th May 2020, 2:25 PM
Namit Jain
Namit Jain - avatar