Function
function is a kind of encapsulation supported by Python, we can decompose complex tasks into simple tasks by splitting large pieces of code into functions through a layer of function calls, which can be called process-oriented programming . function is the basic unit of process-oriented program design.
Functional programming (functional programming)
Functional Programming is an abstraction of a very high degree of programming paradigm . Purely functional programming languages do not have variables, so any function, as long as the input is OK, the output is OK, this pure function We call no side effects. Instead of pure functions (which allow the use of variables), because of the variable state inside the function is not deterministic, the same input, it is possible to get different output, so this function has side effects .
features of functional programming : Allows the function itself to be passed as a parameter to another function, and also allows a function to be returned.
Python provides partial support for functional programming , and Python is not a purely functional programming language, since Python allows the use of variables.
Resources
Liaoche Python-Functional programming
Introduction to Python Functional programming