The function is a block of code which only runs when it’s called. It performs a single related action. The function block begins with def followed by the function name and parentheses
For More - https://beetechnical.com/tech-tutorial/functions-in-python