O'Reilly logo

Python: Visual QuickStart Guide, Second Edition by Toby Donaldson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Data Structures

In this chapter, we introduce the important idea of data structures: collections of values along with commonly performed functions. Python’s programmer-friendly philosophy is to provide a few powerful and efficient data structures—tuples, lists, dictionaries, and sets—that can be combined as needed to make more complex ones.

In the previous chapter we discussed strings, which can be thought of as data structures restricted to storing sequences of characters. The data structures in this chapter can contain not just characters but almost any kind of data.

Python’s two workhorse data structures are lists and dictionaries. Lists are simple, flexible data structures with many uses. Dictionaries, while necessarily a little more ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required