Skip to content

Glossary: Python Basics

.get()

Also written: get

A dictionary method that returns the value for a key, or `None` (or a default you give) if the key is missing. It avoids a `KeyError` and is used for counting.

Where the book teaches it

Related terms

KeyErrorNone