Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Python Tutorial

Python Tutorial

Ratings: (0)|Views: 27 |Likes:
Published by Abhijeet Pandey

More info:

Published by: Abhijeet Pandey on Dec 21, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/03/2013

pdf

text

original

 
Python Tutorial
Release 2.6.4 
Guido van RossumFred L. Drake, Jr., editor
January 04, 2010
Python Software Foundation
Email:
docs@python.org
 
CONTENTS
2.1 Invoking the Interpreter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 The Interpreter and Its Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1 Using Python as a Calculator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 First Steps Towards Programming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.2
Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.3 The
Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.4
Clauses on Loops. . . . . . . . . . . . . . . . . . . 204.5
Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.6 Defining Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.7 More on Defining Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.8 Intermezzo: Coding Style. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.1 More on Lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.2 The
statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.3 Tuples and Sequences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.4 Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345.5 Dictionaries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355.6 Looping Techniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.7 More on Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375.8 Comparing Sequences and Other Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.1 More on Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406.2 Standard Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426.3 The
Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426.4 Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.1 Fancier Output Formatting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477.2 Reading and Writing Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
i

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->