Professional Documents
Culture Documents
2 7 Python+Dictionaries Min
2 7 Python+Dictionaries Min
namespaces
classes
modules
functions
sets
Dictionaries are such an important part of Python that a lot of time and effort was put into
making them as efficient as possible
à multiple instances of the same class à instance attribute names are the same
0 wasted space
1 ['john', John] [ ['—', '—', '—'],
2 1 [-6350376054362344353, 'john', John],
['—', '—', '—'], key order
3 ['alex', Alex]
3 [4939205761874899982, 'alex, Alex], different from
4 ['—', '—', '—'], insertion order
5 ['—', '—', '—'],
6 [6629767757277097963, 'eric', Eric]
6 ['eric', Eric]
]
1 3 6
indices = [None, 1, None, 0, None, None, 2]
© 2019 MathByte Academy