10/5/2016
ThePythonTutorialPython2.7.11documentation
The Python Tutorial
Python is an easy to learn, powerful programming language. It has efficient highlevel
data structures and a simple but effective approach to objectoriented programming.
Pythonselegantsyntaxanddynamictyping,togetherwithitsinterpretednature,makeit
anideallanguageforscriptingandrapidapplicationdevelopmentinmanyareasonmost
platforms.
ThePythoninterpreterandtheextensivestandardlibraryarefreelyavailableinsourceor
binaryformforallmajorplatformsfromthePythonWebsite,[Link]
may be freely distributed. The same site also contains distributions of and pointers to
many free third party Python modules, programs and tools, and additional
documentation.
ThePythoninterpreteriseasilyextendedwithnewfunctionsanddatatypesimplemented
inCorC++(orotherlanguagescallablefromC).Pythonisalsosuitableasanextension
languageforcustomizableapplications.
This tutorial introduces the reader informally to the basic concepts and features of the
Python language and system. It helps to have a Python interpreter handy for handson
experience, but all examples are selfcontained, so the tutorial can be read offline as
well.
For a description of standard objects and modules, see The Python Standard Library.
[Link]
extensions in C or C++, read Extending and Embedding the Python Interpreter and
Python/[Link].
This tutorial does not attempt to be comprehensive and cover every single feature, or
even every commonly used feature. Instead, it introduces many of Pythons most
noteworthy features, and will give you a good idea of the languages flavor and style.
After reading it, you will be able to read and write Python modules and programs, and
you will be ready to learn more about the various Python library modules described in
ThePythonStandardLibrary.
TheGlossaryisalsoworthgoingthrough.
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
1/4
10/5/2016
ThePythonTutorialPython2.7.11documentation
[Link]
[Link]
[Link]
4.1. if Statements
4.2. for Statements
[Link] range() Function
4.4. break and continue Statements,and else ClausesonLoops
4.5. pass Statements
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]:CodingStyle
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link].NestedListComprehensions
[Link] del statement
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link] dir() Function
[Link]
[Link]*FromaPackage
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link] json
[Link]
2/4
10/5/2016
ThePythonTutorialPython2.7.11documentation
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]?
[Link]
3/4
10/5/2016
ThePythonTutorialPython2.7.11documentation
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]:IssuesandLimitations
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
4/4