To add a small footnote to the existing replies to this comment: A related, but slightly different, function in the `functools` module (part of the Python standard library) is the `partial` function. It is like apply() but returns a function instead of calling the function and return its return value: