This notebook contains an excerpt from the Python Programming and Numerical Methods - A Guide for Engineers and Scientists, the content is also available at Berkeley Python Numerical Methods.
The copyright of the book belongs to Elsevier. We also have this interactive book online for a better learning experience. The code is released under the MIT license. If you find this content useful, please consider supporting the work on Elsevier or Amazon!
< Chapter 1 Summary and Problems | Contents | 2.1 Python as A Calculator >
Chapter 2. Variables and Basic Data Structures¶
CHAPTER OUTLINE¶
Motivation¶
Currently, technology can acquire information from the physical world at an enormous rate. For example, there are sensors that can take tens of thousands of pressure, temperature, and acceleration readings per second. To make sense of all this data and process it in a way that will help solve science and engineering problems requires storing information in data structures that you and Python can easily work with.
Variables are used in Python to store and work with data. However, data can take many forms. For example, data can be numbers, words, or have a more complicated structure. It is only natural that Python would have different kinds of variables to hold different kinds of data. In this chapter, you will learn how to create and manipulate Python’s most common variable types.