Python basics
Python is designed to be an easy-to-use and easy-to-read programming language. Consequently, it's also relatively easy to learn, which is part of why it's so popular.
To follow along and run the examples in this and other chapters, I recommend you use one of the following methods:
- Type or copy and paste the code into IPython, a
.py
file, or Jupyter Notebooks. - Run the Jupyter notebook from this book's GitHub repository.
Be careful when copy-pasting code from the book, however, since sometimes lines of code can spill over on multiple lines in the book. This means when copy-pasted, additional newlines may be added that you will need to look out for (and manually remove). We can infer the intended format from syntax highlighting and formatting, or take a look at the code in the Jupyter Notebooks on the book's GitHub repository.
As you are working through examples in this book, I recommend making modifications to the code...