A Simple Function

We'll cover the following...

A function is a block of code that begins with the Python keyword def followed by the actual name of the function. A function can accept zero or more arguments, keyword arguments or a mixture of the two. A function always returns something. If you do not specify what a function should return, it will return None. Here is a very simple function that just returns a string:

Access this course and 1400+ top-rated courses and projects.