pythonreference.com
search statements, functions, methods, exceptions*
hide categories"filtering" and "transforming" list comprehension | combination of filtering and transforming: apply a statement to each of a list of values that pass a test |
"filtering" list comprehension | return each value from the source list that passes a test |
"transforming" list comprehension | apply statement to each value in the source list |
list comprehension operating on a file | operate and/or filter each line from a file |