> For the complete documentation index, see [llms.txt](https://pythonforstarters.solomonmarvel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pythonforstarters.solomonmarvel.com/python-functions/function-definition.md).

# Function Definition

To define a function in Python, you use the def keyword, followed by the name of the function, and a set of parentheses (). The code block within the function is indented.

For example:

```
def call_mum():
    return "Hello Mum!"
```

To call a function, you use the function name followed by a set of parentheses

```
call_mum()
```
