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. Then, ...