Back Navigation Next Navigation Video 6: Lists Tuples Dictionaries (page 10 of 14)

A python dictionary is a collection of items. Unlike other compound data types that only have a value as an element, a dictionary has a key: value pair.

NOTE: As of Python version 3.7, dictionaries are ordered. In Python 3.6 and earlier, dictionaries are unordered.

Dictionaries are created using curly brackets during assignment {}.

Dictionaries

The keys for each item are to the left of the ":" and the associated values are to the right of the ":". The items are separated by a comma.