May 2019
Beginner
528 pages
29h 51m
English
A dictionary associates keys with values. Each key maps to a specific value. The following table contains examples of dictionaries with their keys, key types, values and value types:

A dictionary’s keys must be immutable (such as strings, numbers or tuples) and unique (that is, no duplicates). Multiple keys can have the same value, such as two different inventory codes that have the same quantity in stock.
You can create a dictionary by enclosing in curly braces, {}, a comma-separated list of key–value pairs, each of the form key: value. You can create an ...
Read now
Unlock full access