+ 2
Generators
I was going through python 3 course and came across generators and couldn't get the logic. Need help
1 Answer
+ 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