Y
Hacker News
new
|
ask
|
show
|
jobs
by
skrtskrt
2169 days ago
Python list/set/dict comprehensions too
1 comments
hansvm
2169 days ago
And generator comprehensions -- it's especially nice that you can directly write things like `sum(x*x for x in g)` without needing an extra set of parentheses or allocating an intermediate collection.
link