Re:Translating math into code with examples in Java, Racket,...
by scardine on Tuesday May 28, 2019 @01:42PM
(#20032459)
Python has both generator functions and generator expressions. A generator function is like this:
A generator expression looks like a list comprehension (a Python construct based on the set-builder notation in Math) and is used in situations where you don't really need to materialize the list - for example when you are just iterating over it in a `for` loop:
[ Parent
| on HN ]
There are no comments on this comment yet.