Guided Notes

Functions

help(), def, return values, docstrings, default arguments, and passing functions around.

Getting help

Slide 1 / 5

You've already used built-in functions like print, abs, and min. When you meet an unfamiliar one, help() prints its signature and documentation:

help(round)

Pass the function itself — help(round), not help(round()). The second version calls round first and asks for help on its result.

The documentation tells you what arguments a function takes, which are optional, and what it returns.

← Loops