Python does not have multi-line lambdas because Guido dislikes them aesthetically. However, with just a bit of introspection, code like this is possible: >>> with each([12, 14, 16]): ... def _(x): ... print x ... print x+1 ... 12 13 14 15 16 17 I'll say a bit about my motivation for creating code like this, show how easy it is to write, and then I'll argue that code like this is both pythonic and