June 2017
Beginner to intermediate
274 pages
6h 49m
English
We'll start with a brief look at functions. Functions are created using a def statement, which is a statement using the def keyword as its identifying component. As I said earlier, Python executes the statements in a .py file, starting from the top, as shown in the following screenshot:

When Python executes a def statement, it creates a function as a result. This means that the code that runs before the def statement does not see the function because it doesn't exist yet. The part of the def line inside parentheses is called the parameter list:
example_function(name, radius):
The parameter list is a list of internal names for data ...
Read now
Unlock full access