<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 98.2 beta6 (August 14th, 1998)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Contents</TITLE>
<META NAME="description" CONTENT="Contents">
<META NAME="keywords" CONTENT="tut">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="tut.css">
<LINK REL="next" HREF="node3.html">
<LINK REL="previous" HREF="node1.html">
<LINK REL="up" HREF="tut.html">
<LINK REL="next" HREF="node3.html">
</HEAD>
<BODY bgcolor="#ffffff">
<div class=navigation>
<table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="node3.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="tut.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="node1.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Python Tutorial</b></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="node3.html">1. Whetting Your Appetite</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="tut.html">Python Tutorial</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="node1.html">Front Matter</A></span>
<br><hr></div>
<!--End of Navigation Panel-->
<BR>
<BR>
<H2><A NAME="SECTION002000000000000000000">
Contents</A>
</H2>
<!--Table of Contents-->

<UL>
<LI><A NAME="tex2html87"
 HREF="node2.html">Contents</A>
<LI><A NAME="tex2html88"
 HREF="node3.html">1. Whetting Your Appetite </A>
<UL>
<LI><A NAME="tex2html89"
 HREF="node3.html#SECTION003100000000000000000">1.1 Where From Here </A>
</UL>
<LI><A NAME="tex2html90"
 HREF="node4.html">2. Using the Python Interpreter </A>
<UL>
<LI><A NAME="tex2html91"
 HREF="node4.html#SECTION004100000000000000000">2.1 Invoking the Interpreter </A>
<UL>
<LI><A NAME="tex2html92"
 HREF="node4.html#SECTION004110000000000000000">2.1.1 Argument Passing </A>
<LI><A NAME="tex2html93"
 HREF="node4.html#SECTION004120000000000000000">2.1.2 Interactive Mode </A>
</UL>
<LI><A NAME="tex2html94"
 HREF="node4.html#SECTION004200000000000000000">2.2 The Interpreter and Its Environment </A>
<UL>
<LI><A NAME="tex2html95"
 HREF="node4.html#SECTION004210000000000000000">2.2.1 Error Handling </A>
<LI><A NAME="tex2html96"
 HREF="node4.html#SECTION004220000000000000000">2.2.2 Executable Python Scripts </A>
<LI><A NAME="tex2html97"
 HREF="node4.html#SECTION004230000000000000000">2.2.3 The Interactive Startup File </A>
</UL>
</UL>
<LI><A NAME="tex2html98"
 HREF="node5.html">3. An Informal Introduction to Python </A>
<UL>
<LI><A NAME="tex2html99"
 HREF="node5.html#SECTION005100000000000000000">3.1 Using Python as a Calculator </A>
<UL>
<LI><A NAME="tex2html100"
 HREF="node5.html#SECTION005110000000000000000">3.1.1 Numbers </A>
<LI><A NAME="tex2html101"
 HREF="node5.html#SECTION005120000000000000000">3.1.2 Strings </A>
<LI><A NAME="tex2html102"
 HREF="node5.html#SECTION005130000000000000000">3.1.3 Lists </A>
</UL>
<LI><A NAME="tex2html103"
 HREF="node5.html#SECTION005200000000000000000">3.2 First Steps Towards Programming </A>
</UL>
<LI><A NAME="tex2html104"
 HREF="node6.html">4. More Control Flow Tools </A>
<UL>
<LI><A NAME="tex2html105"
 HREF="node6.html#SECTION006100000000000000000">4.1 if Statements </A>
<LI><A NAME="tex2html106"
 HREF="node6.html#SECTION006200000000000000000">4.2 for Statements </A>
<LI><A NAME="tex2html107"
 HREF="node6.html#SECTION006300000000000000000">4.3 The range() Function </A>
<LI><A NAME="tex2html108"
 HREF="node6.html#SECTION006400000000000000000">4.4 break and continue Statements, and
else Clauses on Loops
</A>
<LI><A NAME="tex2html109"
 HREF="node6.html#SECTION006500000000000000000">4.5 pass Statements </A>
<LI><A NAME="tex2html110"
 HREF="node6.html#SECTION006600000000000000000">4.6 Defining Functions </A>
<LI><A NAME="tex2html111"
 HREF="node6.html#SECTION006700000000000000000">4.7 More on Defining Functions </A>
<UL>
<LI><A NAME="tex2html112"
 HREF="node6.html#SECTION006710000000000000000">4.7.1 Default Argument Values </A>
<LI><A NAME="tex2html113"
 HREF="node6.html#SECTION006720000000000000000">4.7.2 Keyword Arguments </A>
<LI><A NAME="tex2html114"
 HREF="node6.html#SECTION006730000000000000000">4.7.3 Arbitrary Argument Lists </A>
<LI><A NAME="tex2html115"
 HREF="node6.html#SECTION006740000000000000000">4.7.4 Lambda Forms </A>
<LI><A NAME="tex2html116"
 HREF="node6.html#SECTION006750000000000000000">4.7.5 Documentation Strings </A>
</UL>
</UL>
<LI><A NAME="tex2html117"
 HREF="node7.html">5. Data Structures </A>
<UL>
<LI><A NAME="tex2html118"
 HREF="node7.html#SECTION007100000000000000000">5.1 More on Lists </A>
<UL>
<LI><A NAME="tex2html119"
 HREF="node7.html#SECTION007110000000000000000">5.1.1 Functional Programming Tools </A>
</UL>
<LI><A NAME="tex2html120"
 HREF="node7.html#SECTION007200000000000000000">5.2 The del statement </A>
<LI><A NAME="tex2html121"
 HREF="node7.html#SECTION007300000000000000000">5.3 Tuples and Sequences </A>
<LI><A NAME="tex2html122"
 HREF="node7.html#SECTION007400000000000000000">5.4 Dictionaries </A>
<LI><A NAME="tex2html123"
 HREF="node7.html#SECTION007500000000000000000">5.5 More on Conditions </A>
<LI><A NAME="tex2html124"
 HREF="node7.html#SECTION007600000000000000000">5.6 Comparing Sequences and Other Types </A>
</UL>
<LI><A NAME="tex2html125"
 HREF="node8.html">6. Modules </A>
<UL>
<LI><A NAME="tex2html126"
 HREF="node8.html#SECTION008100000000000000000">6.1 More on Modules </A>
<UL>
<LI><A NAME="tex2html127"
 HREF="node8.html#SECTION008110000000000000000">6.1.1 The Module Search Path </A>
<LI><A NAME="tex2html128"
 HREF="node8.html#SECTION008120000000000000000">6.1.2 ``Compiled'' Python files</A>
</UL>
<LI><A NAME="tex2html129"
 HREF="node8.html#SECTION008200000000000000000">6.2 Standard Modules </A>
<LI><A NAME="tex2html130"
 HREF="node8.html#SECTION008300000000000000000">6.3 The dir() Function </A>
<LI><A NAME="tex2html131"
 HREF="node8.html#SECTION008400000000000000000">6.4 Packages </A>
<UL>
<LI><A NAME="tex2html132"
 HREF="node8.html#SECTION008410000000000000000">6.4.1 Importing * From a Package </A>
<LI><A NAME="tex2html133"
 HREF="node8.html#SECTION008420000000000000000">6.4.2 Intra-package References</A>
</UL>
</UL>
<LI><A NAME="tex2html134"
 HREF="node9.html">7. Input and Output </A>
<UL>
<LI><A NAME="tex2html135"
 HREF="node9.html#SECTION009100000000000000000">7.1 Fancier Output Formatting </A>
<LI><A NAME="tex2html136"
 HREF="node9.html#SECTION009200000000000000000">7.2 Reading and Writing Files </A>
<UL>
<LI><A NAME="tex2html137"
 HREF="node9.html#SECTION009210000000000000000">7.2.1 Methods of File Objects </A>
<LI><A NAME="tex2html138"
 HREF="node9.html#SECTION009220000000000000000">7.2.2 The pickle Module </A>
</UL>
</UL>
<LI><A NAME="tex2html139"
 HREF="node10.html">8. Errors and Exceptions </A>
<UL>
<LI><A NAME="tex2html140"
 HREF="node10.html#SECTION0010100000000000000000">8.1 Syntax Errors </A>
<LI><A NAME="tex2html141"
 HREF="node10.html#SECTION0010200000000000000000">8.2 Exceptions </A>
<LI><A NAME="tex2html142"
 HREF="node10.html#SECTION0010300000000000000000">8.3 Handling Exceptions </A>
<LI><A NAME="tex2html143"
 HREF="node10.html#SECTION0010400000000000000000">8.4 Raising Exceptions </A>
<LI><A NAME="tex2html144"
 HREF="node10.html#SECTION0010500000000000000000">8.5 User-defined Exceptions </A>
<LI><A NAME="tex2html145"
 HREF="node10.html#SECTION0010600000000000000000">8.6 Defining Clean-up Actions </A>
</UL>
<LI><A NAME="tex2html146"
 HREF="node11.html">9. Classes </A>
<UL>
<LI><A NAME="tex2html147"
 HREF="node11.html#SECTION0011100000000000000000">9.1 A Word About Terminology </A>
<LI><A NAME="tex2html148"
 HREF="node11.html#SECTION0011200000000000000000">9.2 Python Scopes and Name Spaces </A>
<LI><A NAME="tex2html149"
 HREF="node11.html#SECTION0011300000000000000000">9.3 A First Look at Classes </A>
<UL>
<LI><A NAME="tex2html150"
 HREF="node11.html#SECTION0011310000000000000000">9.3.1 Class Definition Syntax </A>
<LI><A NAME="tex2html151"
 HREF="node11.html#SECTION0011320000000000000000">9.3.2 Class Objects </A>
<LI><A NAME="tex2html152"
 HREF="node11.html#SECTION0011330000000000000000">9.3.3 Instance Objects </A>
<LI><A NAME="tex2html153"
 HREF="node11.html#SECTION0011340000000000000000">9.3.4 Method Objects </A>
</UL>
<LI><A NAME="tex2html154"
 HREF="node11.html#SECTION0011400000000000000000">9.4 Random Remarks </A>
<LI><A NAME="tex2html155"
 HREF="node11.html#SECTION0011500000000000000000">9.5 Inheritance </A>
<UL>
<LI><A NAME="tex2html156"
 HREF="node11.html#SECTION0011510000000000000000">9.5.1 Multiple Inheritance </A>
</UL>
<LI><A NAME="tex2html157"
 HREF="node11.html#SECTION0011600000000000000000">9.6 Private Variables </A>
<LI><A NAME="tex2html158"
 HREF="node11.html#SECTION0011700000000000000000">9.7 Odds and Ends </A>
<UL>
<LI><A NAME="tex2html159"
 HREF="node11.html#SECTION0011710000000000000000">9.7.1 Exceptions Can Be Classes </A>
</UL>
</UL>
<LI><A NAME="tex2html160"
 HREF="node12.html">10. What Now? </A>
<LI><A NAME="tex2html161"
 HREF="node13.html">A. Interactive Input Editing and History Substitution
</A>
<UL>
<LI><A NAME="tex2html162"
 HREF="node13.html#SECTION0013100000000000000000">A1. Line Editing </A>
<LI><A NAME="tex2html163"
 HREF="node13.html#SECTION0013200000000000000000">A2. History Substitution </A>
<LI><A NAME="tex2html164"
 HREF="node13.html#SECTION0013300000000000000000">A3. Key Bindings </A>
<LI><A NAME="tex2html165"
 HREF="node13.html#SECTION0013400000000000000000">A4. Commentary </A>
</UL></UL>
<!--End of Table of Contents-->
<P>
<p>
<div class=navigation><hr><table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="node3.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="tut.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="node1.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Python Tutorial</b></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="node3.html">1. Whetting Your Appetite</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="tut.html">Python Tutorial</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="node1.html">Front Matter</A></span>
</div>
<!--End of Navigation Panel-->
<ADDRESS>
<hr>Send comments on this document to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.
</ADDRESS>
</BODY>
</HTML>
