
Dancing with Python
By :

In this chapter, we looked at four Python collection types: lists, tuples, dictionaries, and sets. They are each optimized for particular applications. I hope this gives you insight for looking at a coding problem and thinking something like, “this is a job for a dictionary whose keys are strings and whose values are lists.” That is, these collection types are useful for a broad range of coding solutions, and your job is to learn to use the right one for the right application.
In the next chapter, we look again at strings and the many ways of creating and manipulating them. You should begin to think of what we do with strings as text processing, a topic we return to in Chapter 12, Searching and Changing Text.