Built-In Data Structures Part 2: Dictionaries
Python has a rich collection of built-in data structures. These data structures are sometimes called "containers" or "collections" because they contain a collection of individual items. These structures cover a wide variety of common programming situations.
In this chapter, we'll build on some of the basics introduced in Chapter 4, Built-In Data Structures Part 1: Lists and Sets. This chapter covers the dictionary structure. This is a mapping from keys to values, sometimes called an associative array.
This chapter will also look at some more advanced topics related to how Python handles references to mutable collection objects. This has consequences in the way functions need to be defined.
In this chapter, we'll look at the following recipes, all related to Python's built-in data structures:
- Creating dictionaries – inserting and updating
- Removing items...