comprehensions and generations this continues the advanced function topics themewith reprisal of the comprehension and iteration concepts previewed in and introduced in because comprehensions are as much related to the prior functional tools ( map and filteras they are to for loopswe'll revisit them in this context here we'll also take second look at iterables in order to study generator functions and their generator expression relatives--user-defined ways to produce results on demand iteration in python also encompasses user-defined classesbut we'll defer that final part of this story until part viwhen we study operator overloading as this is the last pass we'll make over built-in iteration toolsthoughwe will summarize the various tools we've met thus far the next continues this thread by timing the relative performance of these tools as larger case study before thatthoughlet' continue the comprehensions and iterations storyand extend it to include value generators list comprehensions and functional tools as mentioned early in this bookpython supports the proceduralobject-orientedand function programming paradigms in factpython has host of tools that most would considered functional in naturewhich we enumerated in the preceding -closuresgeneratorslambdascomprehensionsmapsdecoratorsfunction objectsand more these tools allow us to apply and combine functions in powerful waysand often offer state retention and coding solutions that are alternatives to classes and oop for instancethe prior explored tools such as map and filter--key members of python' early functional programming toolset inspired by the lisp language--that map operations over iterables and collect results because this is such common task in python codingpython eventually sprouted new expression--the list comprehension--that is even more flexible than the tools we just studied per python historylist comprehensions were originally inspired by similar tool in the functional programming language haskellaround the time of python in shortlist comprehensions apply an arbitrary expression to items in an iterablerather than ap