Lambdas, map, and filter: Functional programming tools in Python
Functions are an especially flexible aspect of the Python language that can be used for much more than simply code generation. As full-blown objects in and of themselves they can be freely passed around a program allowing for generalisation and abstraction of progamming ideas. But Python also provides a more expressive form of function object: the 'lambda' expression. In this article I'll explore the 'lambda' expression, what it is and how it can be used. I'll then cover the built-in tools 'map' and 'filter' and how they, along with 'lambda' represent the functional programming side of Python.