Set
- Store an unordered collection of unique items.
- Default is mutable.
frozensetis immutable.
- Creating an empty set is
set().
Dictionary
- Stores key-value pairs.
- Creating an empty dictionary is
{}. - Requesting a value from a dictionary using a key which is not indexed causes python to raise a
KeyErrorexception.
Tuples and Lists
- Store an ordered collection of items.
- Tuple: immutable
- List: mutable
- When you try to access an index that is out of bounds of a list or a tuple, Python raises an exception called
IndexError.