thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Foundational

Python Dictionary

A mutable Python mapping of unique, hashable keys to values, the natural representation of JSON objects.

Definition

Dictionaries support key lookup, .get() with defaults, .items() iteration, and nesting with lists. Insertion order is preserved (Python 3.7+). Parsed JSON becomes nested dicts and lists.

Example

resp.json()['response'][0]['hostname']

Exam tip

Use dict.get('key', default) to avoid KeyError on missing keys.

Related terms