© Sunil Kapil 2019
Sunil KapilClean Pythonhttps://doi.org/10.1007/978-1-4842-4878-2_2

2. Data Structures

Sunil Kapil1 
(1)
Sunnyvale, CA, USA
 

Data structures are the basic building blocks of any programming language. Having a good grasp of data structures saves you a lot of time, and using them can make your code maintainable. Python has a number of ways to store data using data structures, and having a good understanding of when to use which data structure makes a lot of difference in terms of memory, ease of use, and the performance of the code.

In this chapter, I will first go through some common data structures and explain when to use them in your code. I will also cover the advantages of using those data structures in specific situations. ...

Get Clean Python: Elegant Coding in Python now with the O’Reilly learning platform.

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