딕셔너리는 리스트와 비슷하다. 다른 점은 항목의 순서가 없으며 대신 키-값으로 다룬다.
>>> empty_dict = {}
>>> bierce = { "day": "dayday", "positive": "kind" }
>>> bierce
{'day': 'dayday', 'positive': 'kind'}
>>> lol = [ ['a', 'b'], ['c', 'd'] ]
>>> dict(lol)
{'a': 'b', 'c': 'd'}
>>> tol = (['a', 'b'], ['c', 'd'])
>>> dict(tol)
{'a': 'b', 'c': 'd'}
>>> bierce = { "day": "dayday", "positive": "kind" }
>>> bierce["newday"] = "newdayday"
>>> bierce
{'day': 'dayday', 'positive': 'kind', 'newday': 'newdayday'}
>>> first = {'a': 1, 'b': 2}
>>> second = {'b': 'play'}
>>> first.update(second)
>>> first
{'a': 1, 'b': 'play'}
>>> first
{'a': 1, 'b': 'play'}
>>> first.clear()
>>> first
{}
>>> first = {'a': 1, 'b': 2}
>>> 'a' in first
True
>>> 'c' in first
False
>>> first
{'a': 1, 'b': 2}
>>> first.keys()
dict_keys(['a', 'b'])
>>> first
{'a': 1, 'b': 2}
>>> first.values()
dict_values([1, 2])
>>> first
{'a': 1, 'b': 2}
>>> first.items()
dict_items([('a', 1), ('b', 2)])
>>> list(first.items())
[('a', 1), ('b', 2)]