Whetting Your Appetite
Using the Python Interpreter
Invoking the Interpreter
The Interpreter and Its Environment
An Informal Introduction to Python
Using Python as a Calculator
First Steps Towards Programming
More Control Flow Tools
if Statements
for Statements
The range() Function
break and continue Statements, and else Clauses on Loops
pass Statements
Defining Functions
More on Defining Functions
Intermezzo: Coding Style
Data Structures
More on Lists
The del statement
Tuples and Sequences
Sets
Dictionaries
Looping Techniques
More on Conditions
Comparing Sequences and Other Types
Modules
More on Modules
Standard Modules
The dir() Function
Packages
Input and Output
Fancier Output Formatting
Reading and Writing Files
Errors and Exceptions
Syntax Errors
Exceptions
Handling Exceptions
Raising Exceptions
User-defined Exceptions
Defining Clean-up Actions
Predefined Clean-up Actions
Classes
A Word About Names and Objects
Python Scopes and Namespaces
A First Look at Classes
Random Remarks
Inheritance
Private Variables
Odds and Ends
Iterators
Generators
Generator Expressions
Brief Tour of the Standard Library
Operating System Interface
File Wildcards
Command Line Arguments
Error Output Redirection and Program Termination
String Pattern Matching
Mathematics
Internet Access
Dates and Times
Data Compression
Performance Measurement
Quality Control
Batteries Included
Brief Tour of the Standard Library — Part II
Output Formatting
Templating
Working with Binary Data Record Layouts
Multi-threading
Logging
Weak References
Tools for Working with Lists
Decimal Floating Point Arithmetic
Virtual Environments and Packages
Introduction
Creating Virtual Environments
Managing Packages with pip
What Now?
Interactive Input Editing and History Substitution
Tab Completion and History Editing
Alternatives to the Interactive Interpreter
Floating Point Arithmetic: Issues and Limitations
Representation Error
Appendix
Interactive Mode
Glossary
About these documents
Contributors to the Python Documentation
History and License
History of the software
Terms and conditions for accessing or otherwise using Python
Licenses and Acknowledgements for Incorporated Software
Copyright
Index