List Comprehensions
a syntactic construct for creating a list based on existing lists, analogous to the set-builder notation (Set Comprehension) http://en.wikipedia.org/wiki/List_comprehension
Python-specific bits
-
see Generator
-
http://docs.python.org/tut/node7.html#SECTION007140000000000000000 List comprehensions provide a concise way to create lists without resorting to use of map(), filter() and/or lambda. The resulting list definition tends often to be clearer than lists built using those constructs.
-
http://www.secnetix.de/~olli/Python/list_comprehensions.hawk
-
http://www.diveintopython.org/native_data_types/mapping_lists.html
Edited: | Tweet this! | Search Twitter for discussion
BackLinks: ScenesCollaborationsInventionsAndProgress
No twinpages!