Next:
Whetting Your Appetite
Up:
Python Tutorial
Previous:
Python Tutorial
Contents
Contents
Whetting Your Appetite
Where From Here
Using the Python Interpreter
Invoking the Interpreter
Argument Passing
Interactive Mode
The Interpreter and its Environment
Error Handling
The Module Search Path
``Compiled'' Python files
Executable Python scripts
The Interactive Startup File
Interactive Input Editing and History Substitution
Line Editing
History Substitution
Key Bindings
Commentary
An Informal Introduction to Python
Using Python as a Calculator
Numbers
Strings
Lists
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
Odds and Ends
More on Lists
The
del
statement
Tuples and Sequences
Dictionaries
More on Conditions
Comparing Sequences and Other Types
Modules
More on Modules
Standard Modules
The
dir()
function
Output Formatting
Errors and Exceptions
Syntax Errors
Exceptions
Handling Exceptions
Raising Exceptions
User-defined Exceptions
Defining Clean-up Actions
Classes
A word about terminology
Python scopes and name spaces
A first look at classes
Class definition syntax
Class objects
Instance objects
Method objects
Random remarks
Inheritance
Multiple inheritance
Odds and ends
Recent Additions
The Last Printed Expression
String Literals
Double Quotes
Continuation Of String Literals
Triple-quoted strings
String Literal Juxtaposition
The Formatting Operator
Basic Usage
Referencing Variables By Name
Optional Function Arguments
Default Argument Values
Arbitrary Argument Lists
Lambda And Functional Programming Tools
Lambda Forms
Map, Reduce and Filter
Map.
Filter.
Reduce.
Continuation Lines Without Backslashes
Regular Expressions
Generalized Dictionaries
Miscellaneous New Built-in Functions
Else Clause For Try Statement
About this document ...