Python Functions

A tutorial on Python Functions and how to use them.

Definition

A function is a reusable block of code that runs only when called. Functions save time, increase code re-usability and makes your code simpler and easier to read.

Functions make use of arguments and parameters to receive data and output a result accordingly. This allows for a greater deal of flexibility on your code, since this allows your functions to receive all kinds of different data, and output different results.