Chapter 2

Advanced Data Structures and File Handling

Learning Objectives

By the end of this chapter, you will be able to:

  • Compare Python’s advanced data structures
  • Utilize data structures to solve real-world problems
  • Make use of OS file-handling operations

This chapter emphasizes the data structures in Python and the operating system functions that are the foundation of this book.


We were introduced to the basic concepts of different fundamental data structures in the last chapter. We learned about the list, set, dict, tuple, and string. They are the building blocks of future chapters and are essential for data science.

However, what we have covered so far were only basic operations on them. They have much more to offer ...

Get Data Wrangling with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.