Skip to content

Glossary: Python Basics

def

Also written: define

The keyword that creates a function: `def`, a name, parentheses and a colon, followed by an indented body. Defining it stores the code but does not run it.

Where the book teaches it