Programs often need to work with many pieces of data at once: a list of names, a set of scores, a mapping of usernames to passwords, and so on. Data collections are Python’s way of grouping related values together so you can store, access, and process them efficiently.
In this chapter, you’ll meet four core collection types:
listtupledict(dictionary)set
You’ll see how they look, what they’re good at, and how to perform the most common operations with them.