CHAPTER 3
DATA STRUCTURES IN PYTHON
This chapter introduces an assortment of Python data structures; including lists, vectors, matrices, queues, tuples, dictionaries, and functional programming.
The first part of this chapter discusses lists and operations such as splicing and updating lists. The second portion of the chapter shows you how to work vectors, matrices, and queues.
The third portion of the chapter discusses tuples, sets, and dictionaries. The final part of this chapter discusses functional programming in Python. You will see Python code samples that illustrate how to define lambda expressions and how to use the map() function and filter() function in Python.
NOTE
The scripts in this book are for Python 3.x.
With the preceding points in mind, let’s take a look at the list data type in Python, which is discussed in the next section.