Summary

In this chapter, we’ve met Python’s built-in object types—numbers, strings, lists, dictionaries, tuples, and files—along with the operations Python provides for processing them. We’ve also noticed some of the themes underlying objects in Python along the way; in particular, the notions of operation overloading and type categories help to simplify types in Python. Finally, we’ve seen a few common pitfalls of built-in types.

Almost all the examples in this chapter were deliberately artificial to illustrate the basics. In the next chapter, we’ll start studying statements that create and process objects and let us build up programs that do more realistic work.

Get Learning Python 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.