- A `dict` can also be directly entered as a _dictionary literal_, using curly brackets (`{}`) enclosing `key : value` pairs:
- ```python
- >>> whale = {"name": "Blue Whale", "speed": 35, "land_animal": False}
- {'name': 'Blue Whale', 'speed': 35, 'land_animal': False}
- ```
- ## Accessing Values in a Dictionary
- You can access an entry in a dictionary using a _key_ in square (`[]`) brackets.
- If a `key` does not exist n the `dict`, a `KeyError` is thrown:
- ```python
- >>> bear["speed"]
- 40
- >>> bear["color"]
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- KeyError: 'color'
- ```