Anonymous functions in Python are also called lambda functions. This is because they use the keyword lambda in their definition.
Anonymous functions are so called because, unlike all of the other functions that we have looked at up to this point, they do not require to be named in their definition. The functions are usually throwaway, meaning that they are only required where they are defined, and are not to be called in other parts of the codebase.
The syntax of an anonymous function is as follows:
lambda argument_list: expression
The argument list consists of a comma-separated list of arguments, and the expression is an arithmetic expression that uses these arguments. You can assign the function to a variable to give it a name.