# Dictionaries and Sets

So far the compound types we have studied have been *ordered*. We access elements by integer *indices* numbered from `0`

to `N-1`

, where `N`

is the total number of elements. Dictionaries and sets, in contrast, are *unordered*. Elements must be accessed by a *key* for a dictionary. Set elements are not individually addressable, but it is possible to iterate over a set.