A main function

You could write your code in the main body of your Python file, but using functions and passing arguments to it will make your code easier to maintain and understand. Therefore I recommend that you always write every script with a function called "main".

If you execute this file you might be surprised that nothing happens. This is so because we only defined the function, we never used it. We'll do that next.

def main():

This won't run as the main function is declared, but it is never called (invoked).