List comprehensions in Python
sacredchao.net
sacredchao.net
(That said, he also says towards the end: Don't email me asking for me to optimize your code for you, [...] that's what the Python profiler is for.)
[1] http://docs.python.org/reference/expressions.html#generator-... [2] http://www.python.org/dev/peps/pep-0289/