Reference: Python Functions¶
Quick-lookup pages. Short, dense, and designed to skim — the sort of thing you keep a tab open on while you're coding. If you're here to learn the topic for the first time, start with Learn instead.
Pages in this section¶
- Function syntax — the complete grammar for
def,lambda, parameters, and returns. - Built-in functions — the functions Python gives you for free, with one-line summaries.
- Type hint syntax — annotations for parameters, return values, and generics.
- Docstring conventions — PEP 257 and the three common docstring styles.