Python Functional Programming Example