ABSTRACT

In this chapter you learn about data structures, which Python uses to store and organize numerical, alphabetical, and other types of information. The variables introduced in the previous chapter are a very simple kind of data structure. Here we introduce several more data structures that prove useful in programming, including strings, lists, tuples, and dictionaries, which are all part of core Python. We also introduce NumPy arrays, which are very useful for storing and manipulating scientific data. We introduce a powerful technique called slicing, which allows you to extract and manipulate sections of data contained in lists, tuples, and NumPy arrays. Finally, we introduce some basic ideas about objects, which are central to the underlying structure and functioning of Python.