4.3 Storing Data for Processing

Whenever we work with large amounts of data, we need some means of organizing the data’s storage so that we can process the data in an orderly and efficient manner. Python’s built-in collections provide ways to organize and store data values. We have already introduced one type of collection: strings. In this chapter, we will further explore strings and consider three more Python collections: lists, dictionaries, and tuples.

4.3.1 Strings Revisited

We have introduced the idea of a string as a sequential collection of characters. Python calls this a sequence. Each string is considered to be ordered from left to right, and each character can be accessed using the indexing operation. Provided that our data items ...

Get Python Programming in Context, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.