List of Figures

 

Chapter 2. Getting started

Figure 2.1. Basic interactive mode on Windows XP

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. Here I typed f and then pressed Alt-/, and automatic completion finished the word factorial. I lost the prompt, so I pressed Ctrl-C to interrupt the interpreter and get the prompt back (a closed bracket would have worked here as well). 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 using 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.