List comprehension

Roy Katz katz at
Sat Sep 2 06:17:32 CEST 2000


While browsing the 2.0 feature list, I found this neat little 'List
Comprehension' facility.  Guido mentioned it in his interview with [1] and I've been intrigued by it ever since. 

Does anyone have more examples of how and when to use this (as in,
actual code)?  I'm itching to try and find ways to optimize my programs
with it. 


Roey Katz


More information about the Python-list mailing list