List of Figures

 

Chapter 2. Getting started

Figure 2.1. Basic interactive mode on Windows 10

Figure 2.2. IDLE on Windows

Figure 2.3. Using the Python shell in IDLE. Code is automatically colored (based on Python syntax) as it’s typed in. Placing the cursor on any previous command and pressing the Enter key moves the command and the cursor to the bottom, where you can edit the command and then press Enter to send it to the interpreter. Placing the cursor at the bottom, you can toggle up and down through the history of previous commands by pressing Alt-P and Alt-N. When you have the command you want, edit it as desired and press Enter, and it will be sent to the interpreter.

Chapter 5. Lists, tuples, and sets

Figure 5.1. A list with its first item referring to a nested list

Figure 5.2. The first item of the original list is still a nested list, but the nested variable refers to a different list.

Figure 5.3. A shallow copy doesn’t copy nested lists.

Chapter 8. Control flow

Figure 8.1. Indentation error

Chapter 9. Functions

Figure 9.1. At the beginning of function f(), both the initial variables and the function parameters refer to the same objects.

Figure 9.2. At the end of function f(),y (list1 inside the function) has been changed internally, whereas n and list2 refer to different objects.

Chapter 10. Modules and scoping rules

Figure 10.1. An IDLE edit window provides the same editing functionality as the shell window, including automatic indentation and colorization.